Bug 1183682 - Remove the default browser A/B test for Windows 10 (keep Settings approach). r=gijs
authorJared Wein <jwein@mozilla.com>
Wed, 15 Jul 2015 10:36:55 -0400
changeset 253045 4fc84033bdcf7c09734350cb970dd5e6504154b4
parent 253044 097c196586984231be5d2f18410f132b2a3443ab
child 253046 f4c1152a490a3f684339824d65e63e1423bd6bf5
push id29056
push userkwierso@gmail.com
push dateWed, 15 Jul 2015 23:34:03 +0000
treeherdermozilla-central@9a42bc345feb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs
bugs1183682
milestone42.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 1183682 - Remove the default browser A/B test for Windows 10 (keep Settings approach). r=gijs
browser/app/profile/firefox.js
browser/components/nsBrowserGlue.js
browser/components/shell/nsWindowsShellService.cpp
toolkit/components/telemetry/Histograms.json
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -266,17 +266,16 @@ 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.mostRecentDateSetAsDefault", "");
-pref("browser.shell.windows10DefaultBrowserABTest", -1);
 
 // 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
@@ -161,19 +161,16 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource:///modules/ReaderParent.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "AddonWatcher",
                                   "resource://gre/modules/AddonWatcher.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager",
                                   "resource://gre/modules/LightweightThemeManager.jsm");
 
-XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
-                                  "resource://gre/modules/AppConstants.jsm");
-
 const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser";
 const PREF_PLUGINS_UPDATEURL  = "plugins.update.url";
 
 // Seconds of idle before trying to create a bookmarks backup.
 const BOOKMARKS_BACKUP_IDLE_TIME_SEC = 8 * 60;
 // Minimum interval between backups.  We try to not create more than one backup
 // per interval.
 const BOOKMARKS_BACKUP_MIN_INTERVAL_DAYS = 1;
@@ -1184,27 +1181,16 @@ BrowserGlue.prototype = {
       }
       catch (ex) { /* Don't break the default prompt if telemetry is broken. */ }
 
       if (isDefault) {
         let now = Date.now().toString().slice(0, -3);
         Services.prefs.setCharPref("browser.shell.mostRecentDateSetAsDefault", now);
       }
 
-      if (Services.prefs.getIntPref("browser.shell.windows10DefaultBrowserABTest") == -1) {
-        let abTest = Math.round(Math.random());
-        Services.prefs.setIntPref("browser.shell.windows10DefaultBrowserABTest", abTest);
-      }
-
-      if (AppConstants.isPlatformAndVersionAtLeast("win", "10")) {
-        let abTest = Services.prefs.getIntPref("browser.shell.windows10DefaultBrowserABTest");
-        let result = abTest * 2 + Number(isDefault);
-        Services.telemetry.getHistogramById("WIN_10_DEFAULT_BROWSER_AB_TEST").add(result);
-      }
-
       if (shouldCheck && !isDefault && !willRecoverSession) {
         Services.tm.mainThread.dispatch(function() {
           DefaultBrowserCheck.prompt(RecentWindow.getMostRecentBrowserWindow());
         }.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
       }
     }
 
 #ifdef E10S_TESTING_ONLY
--- a/browser/components/shell/nsWindowsShellService.cpp
+++ b/browser/components/shell/nsWindowsShellService.cpp
@@ -725,17 +725,16 @@ nsWindowsShellService::SetDefaultBrowser
 
   if (aForAllUsers) {
     appHelperPath.AppendLiteral(" /SetAsDefaultAppGlobal");
   } else {
     appHelperPath.AppendLiteral(" /SetAsDefaultAppUser");
   }
 
   nsresult rv = LaunchHelper(appHelperPath);
-  nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
   if (NS_SUCCEEDED(rv) && IsWin8OrLater()) {
     if (aClaimAllTypes) {
       if (IsWin10OrLater()) {
         rv = LaunchModernSettingsDialogDefaultApps();
       } else {
         rv = LaunchControlPanelDefaultsSelectionUI();
       }
       // The above call should never really fail, but just in case
@@ -746,41 +745,30 @@ nsWindowsShellService::SetDefaultBrowser
         } else {
           rv = LaunchHTTPHandlerPane();
         }
       }
     } else {
       // Windows 10 blocks attempts to load the
       // HTTP Handler association dialog.
       if (IsWin10OrLater()) {
-        if (prefs) {
-          int32_t abTest;
-          rv = prefs->GetIntPref("browser.shell.windows10DefaultBrowserABTest", &abTest);
-          if (NS_SUCCEEDED(rv) && abTest == 0) {
-            rv = InvokeHTTPOpenAsVerb();
-          } else {
-            rv = LaunchModernSettingsDialogDefaultApps();
-          }
-        }
+        rv = LaunchModernSettingsDialogDefaultApps();
       } else {
         rv = LaunchHTTPHandlerPane();
       }
 
       // The above call should never really fail, but just in case
       // fall back to showing control panel for all defaults
       if (NS_FAILED(rv)) {
-        if (IsWin10OrLater()) {
-          rv = LaunchModernSettingsDialogDefaultApps();
-        } else {
-          rv = LaunchControlPanelDefaultsSelectionUI();
-        }
+        rv = LaunchControlPanelDefaultsSelectionUI();
       }
     }
   }
 
+  nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
   if (prefs) {
     (void) prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, true);
   }
 
   return rv;
 }
 
 NS_IMETHODIMP
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -7031,23 +7031,16 @@
     "n_buckets": "100",
     "description": "The mean number of pinned tabs (app tabs) in all windows for a session for devtools users."
   },
   "BROWSER_IS_USER_DEFAULT": {
     "expires_in_version": "never",
     "kind": "boolean",
     "description": "The result of the startup default desktop browser check."
   },
-  "WIN_10_DEFAULT_BROWSER_AB_TEST": {
-    "alert_emails": ["jwein@mozilla.com"],
-    "expires_in_version": "45",
-    "kind": "enumerated",
-    "n_values": 4,
-    "description": "A/B test of different default browser dialogs on Windows 10 (0=openas-notdefault, 1=openas-default, 2=modernsettings-notdefault, 3=modernsettings-default)."
-  },
   "BROWSER_IS_ASSIST_DEFAULT": {
     "expires_in_version": "never",
     "kind": "boolean",
     "description": "The result of the default browser check for assist intent."
   },
   "MIXED_CONTENT_PAGE_LOAD": {
     "expires_in_version": "never",
     "kind": "enumerated",