Chromium Code Reviews| 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() && |