mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1298968 - Add comment explaining why TOPSITES is handled outside of switch r=sebastian
MozReview-Commit-ID: BFvz2qTm4vL --HG-- extra : rebase_source : 8d4e77baf5c629c0d16f97c7135fd4c85bf5a5b5
This commit is contained in:
parent
9f2ce6ecc0
commit
b79a5e8eec
@ -1211,6 +1211,10 @@ public class BrowserProvider extends SharedBrowserDatabaseProvider {
|
||||
String[] selectionArgs, String sortOrder) {
|
||||
final int match = URI_MATCHER.match(uri);
|
||||
|
||||
// Handle only queries requiring a writable DB connection here: most queries need only a readable
|
||||
// connection, hence we can get a readable DB once, and then handle most queries within a switch.
|
||||
// TopSites requires a writable connection (because of the temporary tables it uses), hence
|
||||
// we handle that separately, i.e. before retrieving a readable connection.
|
||||
if (match == TOPSITES) {
|
||||
if (uri.getBooleanQueryParameter(BrowserContract.PARAM_TOPSITES_DISABLE_PINNED, false)) {
|
||||
return getPlainTopSites(uri);
|
||||
|
Loading…
Reference in New Issue
Block a user