Index: chrome/browser/search_engines/template_url.h |
diff --git a/chrome/browser/search_engines/template_url.h b/chrome/browser/search_engines/template_url.h |
index ec07d520d1880e7e5610cb25b9e15398b62d6690..c421da84bf044c2895ee0880bec2e757bf6429e3 100644 |
--- a/chrome/browser/search_engines/template_url.h |
+++ b/chrome/browser/search_engines/template_url.h |
@@ -649,6 +649,15 @@ class TemplateURL { |
base::string16* encoded_terms, |
base::string16* encoded_original_query) const; |
+ // Generates a suitable keyword for the specified url, which must be valid. |
+ // This is guaranteed not to return an empty string, since TemplateURLs should |
+ // never have an empty keyword. |
+ static base::string16 GenerateKeyword(const GURL& url); |
Peter Kasting
2014/06/19 00:17:49
Nit: Place this with the other static methods abov
hashimoto
2014/06/19 01:11:45
Moved to below GenerateFaviconURL() which is someh
|
+ |
+ // Returns the search url for this template URL. |
+ // Returns an empty GURL if this template URL has no url(). |
+ GURL GenerateSearchURL(const SearchTermsData& search_terms_data) const; |
+ |
private: |
friend class TemplateURLService; |
FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ReflectsBookmarkBarPinned); |
@@ -661,8 +670,7 @@ class TemplateURL { |
// Resets the keyword if IsGoogleSearchURLWithReplaceableKeyword() or |force|. |
// The |force| parameter is useful when the existing keyword is known to be |
// a placeholder. The resulting keyword is generated using |
- // TemplateURLService::GenerateSearchURL() and |
- // TemplateURLService::GenerateKeyword(). |
+ // GenerateSearchURL() and GenerateKeyword(). |
void ResetKeywordIfNecessary(const SearchTermsData& search_terms_data, |
bool force); |