diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-14 17:16:24 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-14 17:16:24 +0000 |
commit | 257ab718488a1cdb46a2423464e17933c8339a01 (patch) | |
tree | b36111115dd00a00da78113758424603b45cb818 /chrome/browser/search_engines | |
parent | 3f85caafb239d5725ec85af9b8ce9f1b1de15770 (diff) | |
download | chromium_src-257ab718488a1cdb46a2423464e17933c8339a01.zip chromium_src-257ab718488a1cdb46a2423464e17933c8339a01.tar.gz chromium_src-257ab718488a1cdb46a2423464e17933c8339a01.tar.bz2 |
Makes the omnibox show past searches and suggestions for keywords.
We talked about primary and secondary, but after doing it all I felt
keyword and default better portrayed what is going on.
After trying this out I think we need to tune relevancy. But that
can be done later
BUG=3636
TEST=make sure omnibox isn't broken.
Review URL: http://codereview.chromium.org/66073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines')
-rw-r--r-- | chrome/browser/search_engines/template_url.cc | 5 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc index bd6c115..72ffc6d 100644 --- a/chrome/browser/search_engines/template_url.cc +++ b/chrome/browser/search_engines/template_url.cc @@ -491,6 +491,11 @@ GURL TemplateURL::GenerateFaviconURL(const GURL& url) { return url.ReplaceComponents(rep); } +// static +bool TemplateURL::SupportsReplacement(const TemplateURL* turl) { + return turl && turl->url() && turl->url()->SupportsReplacement(); +} + void TemplateURL::SetSuggestionsURL(const std::wstring& suggestions_url, int index_offset, int page_offset) { diff --git a/chrome/browser/search_engines/template_url.h b/chrome/browser/search_engines/template_url.h index c9b36c4..983621a 100644 --- a/chrome/browser/search_engines/template_url.h +++ b/chrome/browser/search_engines/template_url.h @@ -250,6 +250,10 @@ class TemplateURL { // Generates a favicon URL from the specified url. static GURL GenerateFaviconURL(const GURL& url); + // Returns true if |true| is non-null and has a search URL that supports + // replacement. + static bool SupportsReplacement(const TemplateURL* turl); + TemplateURL() : autogenerate_keyword_(false), show_in_default_list_(false), |