Bug 820658 - Private Browsing leaks history in SQLite's Write-Ahead Log for tabs.db r=bnicholson
authorMark Finkle <mfinkle@mozilla.com>
Sat, 15 Dec 2012 23:55:03 -0500
changeset 125290 1fb70af2d687199712cb861372ffe4fc098b716b
parent 125289 b59ec40e33924950f3b603069bb1665a0771c42a
child 125291 3f93a72920e07d74fd3b6a71199e2f60c6290f62
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbnicholson
bugs820658
milestone20.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 820658 - Private Browsing leaks history in SQLite's Write-Ahead Log for tabs.db r=bnicholson
mobile/android/base/TabsAccessor.java
--- a/mobile/android/base/TabsAccessor.java
+++ b/mobile/android/base/TabsAccessor.java
@@ -185,19 +185,19 @@ public final class TabsAccessor {
      */
     private static void insertLocalTabs(final ContentResolver cr, final Iterable<Tab> tabs) {
         // Reuse this for serializing individual history URLs as JSON.
         JSONArray history = new JSONArray();
         ArrayList<ContentValues> valuesToInsert = new ArrayList<ContentValues>();
 
         int position = 0;
         for (Tab tab : tabs) {
-            // Skip this tab if it has a null URL.
+            // Skip this tab if it has a null URL or is in private browsing mode
             String url = tab.getURL();
-            if (url == null)
+            if (url == null || tab.isPrivate())
                 continue;
 
             ContentValues values = new ContentValues();
             values.put(BrowserContract.Tabs.URL, url);
             values.put(BrowserContract.Tabs.TITLE, tab.getTitle());
             values.put(BrowserContract.Tabs.LAST_USED, tab.getLastUsed());
 
             String favicon = tab.getFaviconURL();