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

Unified Diff: chrome/browser/search_engines/template_url.cc

Issue 11884037: InstantExtended: Bail on TemplateURLs with no espv. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/search_engines/template_url.cc
diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc
index aeeed81883641fd21fb8cfe263160c7357fda725..f1ef31fcbc7c25a52eb17a999d79761d5685a46e 100644
--- a/chrome/browser/search_engines/template_url.cc
+++ b/chrome/browser/search_engines/template_url.cc
@@ -468,6 +468,14 @@ bool TemplateURLRef::HasGoogleBaseURLs() const {
return false;
}
+bool TemplateURLRef::HasGoogleInstantExtendedParam() const {
+ ParseIfNecessary();
+ for (size_t i = 0; i < replacements_.size(); ++i)
samarth 2013/01/14 23:37:04 Braces here please.
Jered 2013/01/14 23:57:27 Done.
+ if (replacements_[i].type == GOOGLE_INSTANT_EXTENDED_ENABLED)
+ return true;
+ return false;
+}
+
bool TemplateURLRef::ExtractSearchTermsFromURL(const GURL& url,
string16* search_terms) const {
DCHECK(search_terms);
@@ -801,6 +809,11 @@ bool TemplateURL::IsGoogleSearchURLWithReplaceableKeyword() const {
google_util::DISALLOW_SUBDOMAIN);
}
+bool TemplateURL::SupportsInstantExtendedParam() const {
+ // TODO: Extend this to support other providers.
+ return instant_url_ref_.HasGoogleInstantExtendedParam();
+}
+
bool TemplateURL::HasSameKeywordAs(const TemplateURL& other) const {
return (data_.keyword() == other.data_.keyword()) ||
(IsGoogleSearchURLWithReplaceableKeyword() &&
« no previous file with comments | « chrome/browser/search_engines/template_url.h ('k') | chrome/browser/search_engines/template_url_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698