Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2685)

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 12250033: Consolidate search terms extraction and Instant process determination. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style nit Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/instant/instant_controller.h ('k') | chrome/browser/instant/instant_extended_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 80f9b796a4cf181a57ac371c9af2bab3abe1c1df..62192b6457869df8bb563d3c9df3a25b74296105 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/browser_instant_controller.h"
+#include "chrome/browser/ui/search/search.h"
#include "chrome/browser/ui/search/search_tab_helper.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
@@ -165,10 +166,6 @@ bool IsContentsFrom(const InstantPage* page,
} // namespace
-// static
-const char* InstantController::kLocalOmniboxPopupURL =
- "chrome://local-omnibox-popup/local-omnibox-popup.html";
-
InstantController::InstantController(chrome::BrowserInstantController* browser,
bool extended_enabled)
: browser_(browser),
@@ -392,7 +389,8 @@ bool InstantController::Update(const AutocompleteMatch& match,
// to a backup loader.
if (extended_enabled_ && !overlay_->supports_instant() &&
!overlay_->IsUsingLocalPreview() && browser_->GetActiveWebContents()) {
- CreateOverlay(kLocalOmniboxPopupURL, browser_->GetActiveWebContents());
+ CreateOverlay(chrome::search::kLocalOmniboxPopupURL,
+ browser_->GetActiveWebContents());
}
overlay_->Update(extended_enabled_ ? user_text : full_text,
@@ -1128,7 +1126,7 @@ bool InstantController::EnsureOverlayIsCurrent(bool ignore_blacklist) {
if (!GetInstantURL(profile, ignore_blacklist, &instant_url)) {
// If we are in extended mode, fallback to the local popup.
if (extended_enabled_)
- instant_url = kLocalOmniboxPopupURL;
+ instant_url = chrome::search::kLocalOmniboxPopupURL;
else
return false;
}
@@ -1296,7 +1294,7 @@ bool InstantController::GetInstantURL(Profile* profile,
instant_url->clear();
if (extended_enabled_ && use_local_preview_only_) {
- *instant_url = kLocalOmniboxPopupURL;
+ *instant_url = chrome::search::kLocalOmniboxPopupURL;
return true;
}
« no previous file with comments | « chrome/browser/instant/instant_controller.h ('k') | chrome/browser/instant/instant_extended_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698