Bug 525160: Remove cmd_search and related code [r=vingtetun]
authorMark Finkle <mfinkle@mozilla.com>
Tue, 17 Nov 2009 14:46:20 -0500
changeset 65807 6cc2e8f5021e0f5a3c950e9431276bcd43293e7f
parent 65806 442eb7ecef4877d05877133e6a7a5cc2e049bff4
child 65808 31be6136fc815c923854741fab53fac1508b6bac
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvingtetun
bugs525160
Bug 525160: Remove cmd_search and related code [r=vingtetun]
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.xul
mobile/locales/en-US/chrome/browser.dtd
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -481,21 +481,16 @@ var BrowserUI = {
     this._edit.value = aURI;
 
     var flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
     getBrowser().loadURIWithFlags(aURI, flags, null, null);
 
     gHistSvc.markPageAsTyped(gURIFixup.createFixupURI(aURI, 0));
   },
 
-  search : function() {
-    var queryURI = "http://www.google.com/search?q=" + this._edit.value + "&hl=en&lr=&btnG=Search";
-    getBrowser().loadURI(queryURI, null, null, false);
-  },
-
   showAutoComplete : function() {
     if (this.isAutoCompleteOpen())
       return;
     BrowserSearch.updateSearchButtons();
     this._edit.showHistoryPopup();
   },
 
   isAutoCompleteOpen: function isAutoCompleteOpen() {
@@ -655,17 +650,16 @@ var BrowserUI = {
 
   supportsCommand : function(cmd) {
     var isSupported = false;
     switch (cmd) {
       case "cmd_back":
       case "cmd_forward":
       case "cmd_reload":
       case "cmd_stop":
-      case "cmd_search":
       case "cmd_go":
       case "cmd_openLocation":
       case "cmd_star":
       case "cmd_bookmarks":
       case "cmd_quit":
       case "cmd_close":
       case "cmd_menu":
       case "cmd_newTab":
@@ -698,19 +692,16 @@ var BrowserUI = {
         browser.goForward();
         break;
       case "cmd_reload":
         browser.reload();
         break;
       case "cmd_stop":
         browser.stop();
         break;
-      case "cmd_search":
-        this.search();
-        break;
       case "cmd_go":
         this.goToURI();
         break;
       case "cmd_openLocation":
         this.showToolbar(true);
         this.showAutoComplete();
         break;
       case "cmd_star":
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -90,17 +90,16 @@
   </stringbundleset>
 
   <commandset id="mainCommandSet">
     <!-- basic navigation -->
     <command id="cmd_back" label="&back.label;" disabled="true" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_forward" label="&forward.label;" disabled="true" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_reload" label="&reload.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_stop" label="&stop.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
-    <command id="cmd_search" label="&search.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_go" label="&go.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_openLocation" label="&openLocation.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
 
     <!-- tabs -->
     <command id="cmd_newTab" label="&newtab.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_closeTab" label="&closetab.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
 
     <!-- bookmarking -->
--- a/mobile/locales/en-US/chrome/browser.dtd
+++ b/mobile/locales/en-US/chrome/browser.dtd
@@ -1,13 +1,12 @@
 <!ENTITY back.label            "Back">
 <!ENTITY forward.label         "Forward">
 <!ENTITY reload.label          "Reload">
 <!ENTITY stop.label            "Stop">
-<!ENTITY search.label          "Search">
 <!ENTITY go.label              "Go">
 <!ENTITY openLocation.label    "Open location">
 <!ENTITY star.label            "Star">
 
 <!ENTITY newtab.label          "New Tab">
 <!ENTITY closetab.label        "Close Tab">
 
 <!ENTITY cut.label             "Cut">