Bug 1179249 - Always use the modern settings dialog in Preferences on Windows 10. r=jaws
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Fri, 03 Jul 2015 06:39:52 +0900
changeset 251178 f0fbcfe0a7a7f72a9ad4042f4249fa4d73a1b5de
parent 251177 69d9848dd6a5807f67edf4ac377fbe26d29a5c23
child 251224 e3033b7bfb08a8302c63239e725d01398148b547
push id13835
push userVYV03354@nifty.ne.jp
push dateThu, 02 Jul 2015 21:40:15 +0000
treeherderfx-team@f0fbcfe0a7a7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1179249
milestone42.0a1
Bug 1179249 - Always use the modern settings dialog in Preferences on Windows 10. r=jaws
browser/components/preferences/in-content/main.js
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -682,69 +682,43 @@ var gMainPane = {
   /*
    * Preferences:
    *
    * browser.shell.checkDefault
    * - true if a default-browser check (and prompt to make it so if necessary)
    *   occurs at startup, false otherwise
    */
 
-   /**
-    * Firefox can attempt to set itself as the default application
-    * for all related filetypes or just for HTML. Some platforms
-    * such as Windows have terrible UIs for all filetypes. In those
-    * platforms, Firefox only attempts to associate itself with HTML.
-    */
-   shouldClaimAllTypes: function()
-   {
-    let claimAllTypes = true;
-    try {
-      if (AppConstants.platform == "win") {
-        // In Windows 10+, the UI for selecting default protocol is much
-        // nicer than the UI for setting file type associations. So we
-        // only show the protocol association screen on Windows 10+.
-        // Windows 8.1 is version 6.3. The startup code still uses
-        // the default protocol dialog, but the preferences is more "advanced"
-        // and as such uses the file type associations.
-        let version = Services.sysinfo.getProperty("version");
-        claimAllTypes = (parseFloat(version) <= 6.3);
-      }
-    } catch (ex) {}
-    return claimAllTypes;
-   },
-
   /**
    * Show button for setting browser as default browser or information that
    * browser is already the default browser.
    */
   updateSetDefaultBrowser: function()
   {
     let shellSvc = getShellService();
     let defaultBrowserBox = document.getElementById("defaultBrowserBox");
     if (!shellSvc) {
       defaultBrowserBox.hidden = true;
       return;
     }
     let setDefaultPane = document.getElementById("setDefaultPane");
-    let claimAllTypes = gMainPane.shouldClaimAllTypes();
-    let selectedIndex = shellSvc.isDefaultBrowser(false, claimAllTypes) ? 1 : 0;
+    let selectedIndex = shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
     setDefaultPane.selectedIndex = selectedIndex;
   },
 
   /**
    * Set browser as the operating system default browser.
    */
   setDefaultBrowser: function()
   {
     let shellSvc = getShellService();
     if (!shellSvc)
       return;
     try {
-      let claimAllTypes = gMainPane.shouldClaimAllTypes();
-      shellSvc.setDefaultBrowser(claimAllTypes, false);
+      shellSvc.setDefaultBrowser(true, false);
     } catch (ex) {
       Cu.reportError(ex);
       return;
     }
     let selectedIndex =
       shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
     document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
   }