Bug 777649 - Use history ID for removing items on the all pages screen. r=margaret
authorWes Johnston <wjohnston@mozilla.com>
Thu, 26 Jul 2012 12:53:19 -0700
changeset 100634 a9fcfa1a0d69c6375bb83884cbfc8417745dd85b
parent 100633 9118c1ca0aac18941014cd36532abdc5266ccc10
child 100635 4f5722507e684b705f3f96c1dc0d64f6b1c3093f
push id12578
push userwjohnston@mozilla.com
push dateThu, 26 Jul 2012 19:54:07 +0000
treeherdermozilla-inbound@a9fcfa1a0d69 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs777649
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 777649 - Use history ID for removing items on the all pages screen. r=margaret
mobile/android/base/awesomebar/AllPagesTab.java
mobile/android/base/awesomebar/BookmarksTab.java
--- a/mobile/android/base/awesomebar/AllPagesTab.java
+++ b/mobile/android/base/awesomebar/AllPagesTab.java
@@ -537,18 +537,18 @@ public class AllPagesTab extends Awesome
         Cursor cursor = ((AwesomeBarCursorItem) selectedItem).getCursor();
 
         // Don't show the context menu for folders
         String keyword = null;
         int keywordCol = cursor.getColumnIndex(URLColumns.KEYWORD);
         if (keywordCol != -1)
             keyword = cursor.getString(keywordCol);
 
-        // Use the bookmark id for the Bookmarks tab and the history id for the Top Sites tab 
-        int id = cursor.getInt(cursor.getColumnIndexOrThrow(Combined._ID));
+        // Use the history id in order to allow removing history entries
+        int id = cursor.getInt(cursor.getColumnIndexOrThrow(Combined.HISTORY_ID));
 
         subject = new ContextMenuSubject(id,
                                         cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.URL)),
                                         cursor.getBlob(cursor.getColumnIndexOrThrow(URLColumns.FAVICON)),
                                         cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.TITLE)),
                                         keyword);
 
         if (subject == null)
--- a/mobile/android/base/awesomebar/BookmarksTab.java
+++ b/mobile/android/base/awesomebar/BookmarksTab.java
@@ -409,17 +409,16 @@ public class BookmarksTab extends Awesom
 
         // Don't show the context menu for folders
         if (!(cursor.getInt(cursor.getColumnIndexOrThrow(Bookmarks.TYPE)) == Bookmarks.TYPE_FOLDER)) {
             String keyword = null;
             int keywordCol = cursor.getColumnIndex(URLColumns.KEYWORD);
             if (keywordCol != -1)
                 keyword = cursor.getString(keywordCol);
 
-            // Use the bookmark id for the Bookmarks tab and the history id for the Top Sites tab 
             int id = cursor.getInt(cursor.getColumnIndexOrThrow(Bookmarks._ID));
 
             subject = new ContextMenuSubject(id,
                                             cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.URL)),
                                             cursor.getBlob(cursor.getColumnIndexOrThrow(URLColumns.FAVICON)),
                                             cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.TITLE)),
                                             keyword);
         }