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..e130fe1c237f7b3c938604f7d36c81b39aa05fa7 100644 |
| --- a/chrome/browser/search_engines/template_url.cc |
| +++ b/chrome/browser/search_engines/template_url.cc |
| @@ -468,6 +468,15 @@ bool TemplateURLRef::HasGoogleBaseURLs() const { |
| return false; |
| } |
| +bool TemplateURLRef::HasGoogleInstantExtendedParam() const { |
| + ParseIfNecessary(); |
| + for (size_t i = 0; i < replacements_.size(); ++i) { |
| + if (replacements_[i].type == GOOGLE_INSTANT_EXTENDED_ENABLED) |
| + return true; |
| + } |
|
beaudoin
2013/01/15 00:34:55
Not a huge fan of using the replacements to do tha
Jered
2013/01/15 19:06:28
I'm not sure I follow. &espv and GOOGLE_INSTANT_EX
|
| + return false; |
| +} |
| + |
| bool TemplateURLRef::ExtractSearchTermsFromURL(const GURL& url, |
| string16* search_terms) const { |
| DCHECK(search_terms); |
| @@ -801,6 +810,11 @@ bool TemplateURL::IsGoogleSearchURLWithReplaceableKeyword() const { |
| google_util::DISALLOW_SUBDOMAIN); |
| } |
| +bool TemplateURL::SupportsInstantExtendedParam() const { |
| + // TODO: Extend this to support other providers. |
|
beaudoin
2013/01/15 00:34:55
You can assign these TODO to me, I've kind of made
Jered
2013/01/15 19:06:28
Cool, thanks.
|
| + return instant_url_ref_.HasGoogleInstantExtendedParam(); |
| +} |
| + |
| bool TemplateURL::HasSameKeywordAs(const TemplateURL& other) const { |
| return (data_.keyword() == other.data_.keyword()) || |
| (IsGoogleSearchURLWithReplaceableKeyword() && |