Bug 1170304 - Change browser.shell.isSetAsDefaultBrowser to browser.shell.wasEverSetAsDefaultBrowser. r=dolske a=kwierso
authorJared Wein <jwein@mozilla.com>
Tue, 09 Jun 2015 11:06:39 -0700
changeset 248046 3d10908774c579e93cfea69908edb2f2899e82d9
parent 248045 72990290c446946e35c186bd9e3e3499affd5ca6
child 248047 ba4ba4458feb96a6223cf20eedaceee53bea348d
push id60888
push userkwierso@gmail.com
push dateThu, 11 Jun 2015 01:38:38 +0000
treeherdermozilla-inbound@39e638ed06bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske, kwierso
bugs1170304
milestone41.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 1170304 - Change browser.shell.isSetAsDefaultBrowser to browser.shell.wasEverSetAsDefaultBrowser. r=dolske a=kwierso
browser/app/profile/firefox.js
browser/components/nsBrowserGlue.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -265,17 +265,17 @@ pref("general.smoothScroll", true);
 pref("general.autoScroll", false);
 #else
 pref("general.autoScroll", true);
 #endif
 
 // At startup, check if we're the default browser and prompt user if not.
 pref("browser.shell.checkDefaultBrowser", true);
 pref("browser.shell.shortcutFavicons",true);
-pref("browser.shell.isSetAsDefaultBrowser", false);
+pref("browser.shell.mostRecentDateSetAsDefault", "");
 
 // 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session
 // The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore
 pref("browser.startup.page",                1);
 pref("browser.startup.homepage",            "chrome://branding/locale/browserconfig.properties");
 
 pref("browser.slowStartup.notificationDisabled", false);
 pref("browser.slowStartup.timeThreshold", 40000);
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1108,17 +1108,20 @@ BrowserGlue.prototype = {
       try {
         // Report default browser status on startup to telemetry
         // so we can track whether we are the default.
         Services.telemetry.getHistogramById("BROWSER_IS_USER_DEFAULT")
                           .add(isDefault);
       }
       catch (ex) { /* Don't break the default prompt if telemetry is broken. */ }
 
-      Services.prefs.setBoolPref("browser.shell.isSetAsDefaultBrowser", isDefault);
+      if (isDefault) {
+        let now = Date.now().toString().slice(0, -3);
+        Services.prefs.setCharPref("browser.shell.mostRecentDateSetAsDefault", now);
+      }
 
       if (shouldCheck && !isDefault && !willRecoverSession) {
         Services.tm.mainThread.dispatch(function() {
           DefaultBrowserCheck.prompt(RecentWindow.getMostRecentBrowserWindow());
         }.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
       }
     }