From 64661159aea7b40487c76ed3d02e9399bb8500b1 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Wed, 12 Mar 2014 23:30:41 +0100 Subject: [PATCH] Bug 960047 - Reset Sync promobox count for bookmark/add-on/passwords panels. r=gavin --- browser/base/content/urlbarBindings.xml | 17 +++-------------- browser/components/nsBrowserGlue.js | 8 +++++++- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index 2e108b37b90..0d2a6e9b90a 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -2055,21 +2055,10 @@ diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index 49d65c18f22..8990eedc941 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -1292,7 +1292,7 @@ BrowserGlue.prototype = { }, _migrateUI: function BG__migrateUI() { - const UI_VERSION = 21; + const UI_VERSION = 22; const BROWSER_DOCURL = "chrome://browser/content/browser.xul#"; let currentUIVersion = 0; try { @@ -1574,6 +1574,12 @@ BrowserGlue.prototype = { } } + if (currentUIVersion < 22) { + // Reset the Sync promobox count to promote the new FxAccount-based Sync. + Services.prefs.clearUserPref("browser.syncPromoViewsLeft"); + Services.prefs.clearUserPref("browser.syncPromoViewsLeftMap"); + } + if (this._dirty) this._dataSource.QueryInterface(Ci.nsIRDFRemoteDataSource).Flush();