Bug 1224950 - Remove redundant RemoteNewTabUtils use in content/browser.js r=mconley

--HG--
extra : commitid : FGc7Y4TMaBQ
extra : amend_source : a69f5ebe320229fe4a8f012bc4571209c77bc5f5
This commit is contained in:
Olivier Yiptong 2015-11-19 16:51:48 -05:00
parent a10c269286
commit a44b36b9b2

View File

@ -11,7 +11,6 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/NotificationDB.jsm");
Cu.import("resource:///modules/RecentWindow.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
"resource://gre/modules/Preferences.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Deprecated",
@ -34,8 +33,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "GMPInstallManager",
"resource://gre/modules/GMPInstallManager.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "RemoteNewTabUtils",
"resource:///modules/RemoteNewTabUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ContentSearch",
"resource:///modules/ContentSearch.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AboutHome",
@ -3564,11 +3561,8 @@ const BrowserSearch = {
if (!aSearchBar || document.activeElement != aSearchBar.textbox.inputField) {
let url = gBrowser.currentURI.spec.toLowerCase();
let mm = gBrowser.selectedBrowser.messageManager;
let newTabRemoted = Services.prefs.getBoolPref("browser.newtabpage.remote");
if (url === "about:home" ||
(url === "about:newtab" &&
((!newTabRemoted && NewTabUtils.allPages.enabled) ||
(newTabRemoted && RemoteNewTabUtils.allPages.enabled)))) {
(url === "about:newtab" && NewTabUtils.allPages.enabled)) {
ContentSearch.focusInput(mm);
} else {
openUILinkIn("about:home", "current");