Bug 1179249 - Always use the modern settings dialog in Preferences on Windows 10. r=jaws, a=dolske
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Fri, 03 Jul 2015 06:39:52 +0900
changeset 275547 8567de70fdd5807c0afe968714ce78b97ec29f9e
parent 275546 0f006867249f7415277159e87a0f60085c647bd3
child 275548 dad22a127344b0042160cb0bee177c72c9b2825c
push id880
push userjdolske@mozilla.com
push dateWed, 12 Aug 2015 00:23:04 +0000
treeherdermozilla-release@dad22a127344 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, dolske
bugs1179249
milestone40.0
Bug 1179249 - Always use the modern settings dialog in Preferences on Windows 10. r=jaws, a=dolske
browser/components/preferences/in-content/main.js
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -679,69 +679,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;
   }