Chromium Code Reviews| Index: chrome/browser/search/search.h |
| diff --git a/chrome/browser/search/search.h b/chrome/browser/search/search.h |
| index 68ac6d864f792ee1b34f247e58344b83de1ca373..c16bb6921c4c077c164c00a56992f47a835c5f62 100644 |
| --- a/chrome/browser/search/search.h |
| +++ b/chrome/browser/search/search.h |
| @@ -78,15 +78,23 @@ bool IsSuggestPrefEnabled(Profile* profile); |
| // the Instant Extended API is not enabled. |
| uint64 EmbeddedSearchPageVersion(); |
| -// Returns whether query extraction is enabled. |
| +// Returns whether query extraction flag is enabled in the field trials. |
| bool IsQueryExtractionEnabled(); |
| -// Extracts and returns search terms from |url|. Returns empty string if the URL |
| -// is not secure or doesn't have a search term replacement key. Does not |
| -// consider IsQueryExtractionEnabled() and Instant support state of the page and |
| -// does not check for a privileged process, so most callers should use |
| +// Extracts and returns search terms from |url|. Does not consider |
| +// IsQueryExtractionEnabled() and Instant support state of the page and does |
| +// not check for a privileged process, so most callers should use |
| // GetSearchTerms() below instead. |
| -base::string16 GetSearchTermsFromURL(Profile* profile, const GURL& url); |
| +base::string16 ExtractSearchTermsFromURL(Profile* profile, const GURL& url); |
| + |
| +// Returns true if |url| passes some basic checks that must succeed for it to be |
| +// usable as an instant URL: |
|
Jered
2014/02/11 19:10:10
How about rewording this comment:
"Returns true if
kmadhusu
2014/02/11 23:24:32
Done.
|
| +// (1) It contains the search terms replacement key of |template_url|, which is |
| +// expected to be the TemplateURL* for the default search provider. |
| +// (2) Either it has a secure scheme, or else the user has manually specified a |
| +// --google-base-url and it uses that base URL. (This allows testers to use |
| +// --google-base-url to point at non-HTTPS servers, which eases testing.) |
| +bool IsSuitableURLForInstant(Profile* profile, const GURL& url); |
|
kmadhusu
2014/02/11 01:40:03
This function deserves a better name. I would like
Jered
2014/02/11 19:10:10
How about IsQueryExtractionAllowedForURL()?
kmadhusu
2014/02/11 23:24:32
Done.
|
| // Returns the search terms attached to a specific NavigationEntry, or empty |
| // string otherwise. Does not consider IsQueryExtractionEnabled() and does not |