Bug 1184737 - Windows 10 search rewrite should handle more results. r=jaws
authorJustin Dolske <dolske@mozilla.com>
Fri, 17 Jul 2015 13:24:25 -0700
changeset 253547 7b33ab963ae7d646bdea76deb165e594be23c67c
parent 253546 40bf29309bf5debf45ec79038b077fc228575d12
child 253548 081e6aa562f296c2a5157f6633dfe20decc93f92
push id29070
push userttaubert@mozilla.com
push dateMon, 20 Jul 2015 07:15:19 +0000
treeherdermozilla-central@202e9233d130 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1184737
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 1184737 - Windows 10 search rewrite should handle more results. r=jaws
browser/components/nsBrowserContentHandler.js
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -756,22 +756,24 @@ nsDefaultCommandLineHandler.prototype = 
         if (redirectWinSearch &&
             (uriScheme == "http" || uriScheme == "https") &&
             uriHost.endsWith(".bing.com") && uriPath.startsWith("/search")) {
           try {
             var url = uri.QueryInterface(Components.interfaces.nsIURL);
             var params = new URLSearchParams(url.query);
             // We don't want to rewrite all Bing URLs coming from external apps. Look
             // for the magic URL parm that's present in searches from the task bar.
-            // (Typed searches use "form=WNSGPH", Cortana voice searches use "FORM=WNSBOX")
+            // (Typed searches use "form=WNSGPH", Cortana voice searches use "FORM=WNSBOX"
+            // for direct results, or "FORM=WNSFC2" for "see more results on
+            // Bing.com")
             var formParam = params.get("form");
             if (!formParam) {
               formParam = params.get("FORM");
             }
-            if (formParam == "WNSGPH" || formParam == "WNSBOX") {
+            if (formParam == "WNSGPH" || formParam == "WNSBOX" || formParam == "WNSFC2") {
               var term = params.get("q");
               var ss = Components.classes["@mozilla.org/browser/search-service;1"]
                                  .getService(nsIBrowserSearchService);
               var submission = ss.defaultEngine.getSubmission(term, null, "searchbar");
               uri = submission.uri;
             }
           } catch (e) {
             Components.utils.reportError("Couldn't redirect Windows search: " + e);