author | Richard Newman <rnewman@mozilla.com> |
Mon, 02 Jan 2012 08:37:14 -0800 | |
changeset 83642 | 44d992ccc97a76b333509576f4ccdf0da89299be |
parent 83641 | ac280e7eb3e665f21315a0510e25cf43ca6b277e |
child 83643 | e0bfd4932e93514ed8a824c33234b54f807c3e17 |
child 105495 | df210db11b95aadf4b23fc6ba6a3cfa26e40b820 |
push id | 21779 |
push user | rnewman@mozilla.com |
push date | Mon, 02 Jan 2012 16:38:15 +0000 |
treeherder | mozilla-central@44d992ccc97a [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mfinkle |
bugs | 714565 |
milestone | 12.0a1 |
first release with | nightly linux32
44d992ccc97a
/
12.0a1
/
20120103031056
/
files
nightly linux64
44d992ccc97a
/
12.0a1
/
20120103031056
/
files
nightly mac
44d992ccc97a
/
12.0a1
/
20120103031056
/
files
nightly win32
44d992ccc97a
/
12.0a1
/
20120103031056
/
files
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
releases | nightly linux32
12.0a1
/
20120103031056
/
pushlog to previous
nightly linux64
12.0a1
/
20120103031056
/
pushlog to previous
nightly mac
12.0a1
/
20120103031056
/
pushlog to previous
nightly win32
12.0a1
/
20120103031056
/
pushlog to previous
|
--- a/mobile/android/base/db/BrowserProvider.java.in +++ b/mobile/android/base/db/BrowserProvider.java.in @@ -383,19 +383,18 @@ public class BrowserProvider extends Con } } private DatabaseHelper getDatabaseHelperForProfile(String profile) { // Each profile has a separate browser.db database. The target // profile is provided using a URI query argument in each request // to our content provider. - // Always fallback to default profile if non has been provided. + // Always fallback to default profile if none has been provided. if (TextUtils.isEmpty(profile)) { - Log.d(LOGTAG, "No profile provided, using default."); profile = BrowserContract.DEFAULT_PROFILE; } DatabaseHelper dbHelper; synchronized (this) { dbHelper = mDatabasePerProfile.get(profile); if (dbHelper != null) { return dbHelper; @@ -824,48 +823,45 @@ public class BrowserProvider extends Con Log.d(LOGTAG, "Updated " + updated + " rows for URI: " + uri); return updated; } @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { - Log.d(LOGTAG, "Querying with URI: " + uri); - SQLiteDatabase db = getReadableDatabase(uri); final int match = URI_MATCHER.match(uri); SQLiteQueryBuilder qb = new SQLiteQueryBuilder(); String limit = uri.getQueryParameter(BrowserContract.PARAM_LIMIT); switch (match) { case BOOKMARKS_FOLDER_ID: case BOOKMARKS_ID: case BOOKMARKS: { Log.d(LOGTAG, "Query is on bookmarks: " + uri); if (match == BOOKMARKS_ID) { - Log.d(LOGTAG, "Query is BOOKMARKS_ID: " + uri); selection = concatenateWhere(selection, Bookmarks._ID + " = ?"); selectionArgs = appendSelectionArgs(selectionArgs, new String[] { Long.toString(ContentUris.parseId(uri)) }); } else if (match == BOOKMARKS_FOLDER_ID) { - Log.d(LOGTAG, "Query is BOOKMARKS_FOLDER_ID: " + uri); selection = concatenateWhere(selection, Bookmarks.PARENT + " = ?"); selectionArgs = appendSelectionArgs(selectionArgs, new String[] { Long.toString(ContentUris.parseId(uri)) }); } if (!shouldShowDeleted(uri)) selection = concatenateWhere(Bookmarks.IS_DELETED + " = 0", selection); if (TextUtils.isEmpty(sortOrder)) { - Log.d(LOGTAG, "Using default sort order on query: " + uri); sortOrder = DEFAULT_BOOKMARKS_SORT_ORDER; + } else { + Log.d(LOGTAG, "Using sort order " + sortOrder + "."); } qb.setProjectionMap(BOOKMARKS_PROJECTION_MAP); if (hasImagesInProjection(projection)) qb.setTables(VIEW_BOOKMARKS_WITH_IMAGES); else qb.setTables(TABLE_BOOKMARKS); @@ -873,17 +869,16 @@ public class BrowserProvider extends Con break; } case HISTORY_ID: case HISTORY: { Log.d(LOGTAG, "Query is on history: " + uri); if (match == HISTORY_ID) { - Log.d(LOGTAG, "Query is HISTORY_ID: " + uri); selection = concatenateWhere(selection, History._ID + " = ?"); selectionArgs = appendSelectionArgs(selectionArgs, new String[] { Long.toString(ContentUris.parseId(uri)) }); } if (!shouldShowDeleted(uri)) selection = concatenateWhere(History.IS_DELETED + " = 0", selection); @@ -900,45 +895,43 @@ public class BrowserProvider extends Con break; } case IMAGES_ID: case IMAGES: { Log.d(LOGTAG, "Query is on images: " + uri); if (match == IMAGES_ID) { - Log.d(LOGTAG, "Query is IMAGES_ID: " + uri); selection = concatenateWhere(selection, Images._ID + " = ?"); selectionArgs = appendSelectionArgs(selectionArgs, new String[] { Long.toString(ContentUris.parseId(uri)) }); } if (!shouldShowDeleted(uri)) selection = concatenateWhere(Images.IS_DELETED + " = 0", selection); qb.setProjectionMap(IMAGES_PROJECTION_MAP); qb.setTables(TABLE_IMAGES); break; } case SCHEMA: { - Log.d(LOGTAG, "Query is on schema: " + uri); - + Log.d(LOGTAG, "Query is on schema."); MatrixCursor schemaCursor = new MatrixCursor(new String[] { Schema.VERSION }); schemaCursor.newRow().add(DATABASE_VERSION); return schemaCursor; } default: throw new UnsupportedOperationException("Unknown query URI " + uri); } - Log.d(LOGTAG, "Finally running the built query: " + uri); + Log.d(LOGTAG, "Running built query."); Cursor cursor = qb.query(db, projection, selection, selectionArgs, null, null, sortOrder, limit); cursor.setNotificationUri(getContext().getContentResolver(), BrowserContract.AUTHORITY_URI); return cursor; }