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

Unified Diff: chrome/browser/ui/toolbar/toolbar_model_impl.cc

Issue 11576044: Remove call to IsInstantExtendedAPIGoogleSearchUrl from ToolbarModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nit Created 7 years, 11 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
Index: chrome/browser/ui/toolbar/toolbar_model_impl.cc
diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.cc b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
index 94f2d727e5a5f6c7ae10536bd28cec726ad17f57..0ae928bcdeb17db8dddfd80cd35e5c67a8f0a4a2 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
@@ -217,15 +217,14 @@ string16 ToolbarModelImpl::TryToExtractSearchTermsFromURL() const {
// Ensure query extraction is enabled and query URL is HTTPS.
if (!profile || !chrome::search::IsQueryExtractionEnabled(profile) ||
- !url.SchemeIs(chrome::kHttpsScheme) ||
- !google_util::IsInstantExtendedAPIGoogleSearchUrl(url.spec()))
+ !url.SchemeIs(chrome::kHttpsScheme))
return string16();
TemplateURLService* template_url_service =
TemplateURLServiceFactory::GetForProfile(profile);
- TemplateURL *template_url = template_url_service->GetDefaultSearchProvider();
- if (!template_url)
+ TemplateURL* template_url = template_url_service->GetDefaultSearchProvider();
+ if (!template_url || !template_url->HasSearchTermsReplacementKey(url))
return string16();
string16 result;
« no previous file with comments | « chrome/browser/search_engines/template_url_unittest.cc ('k') | chrome/browser/ui/toolbar/toolbar_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698