summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/keyword_provider.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-10 21:44:11 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-10 21:44:11 +0000
commitdf6ab6b6eba3534d972426df1d4e1c1de7fdb98a (patch)
treee32af3d47800e701e9be2590d3c732a88aaa4856 /chrome/browser/autocomplete/keyword_provider.h
parent5a3f62856d89817d4117de189e855a6dad16c2ee (diff)
downloadchromium_src-df6ab6b6eba3534d972426df1d4e1c1de7fdb98a.zip
chromium_src-df6ab6b6eba3534d972426df1d4e1c1de7fdb98a.tar.gz
chromium_src-df6ab6b6eba3534d972426df1d4e1c1de7fdb98a.tar.bz2
Don't allow exact keyword matches for most uses of the autocomplete classifier. Patch by Naoki Takano (see http://codereview.chromium.org/4142006 ), r=me.
BUG=60059 TEST=Change a search engine keyword to "a", highlight text beginning with "a" in a webpage (e.g. "a movie"), right-click and select "Search Google for a movie". The result should be a Google search page, not a result page for whatever search engine has the keyword "a". Review URL: http://codereview.chromium.org/4717001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/keyword_provider.h')
-rw-r--r--chrome/browser/autocomplete/keyword_provider.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/keyword_provider.h b/chrome/browser/autocomplete/keyword_provider.h
index 711562a..e39b5b6 100644
--- a/chrome/browser/autocomplete/keyword_provider.h
+++ b/chrome/browser/autocomplete/keyword_provider.h
@@ -105,9 +105,12 @@ class KeywordProvider : public AutocompleteProvider,
// typed the complete keyword, and whether the keyword needs query text (true
// if the keyword supports replacement and the user isn't in "prefer keyword
// matches" mode).
+ // If |allow_exact_keyword_match| is false, the relevance for complete
+ // keywords is degraded.
static int CalculateRelevance(AutocompleteInput::Type type,
bool complete,
- bool no_query_text_needed);
+ bool no_query_text_needed,
+ bool allow_exact_keyword_match);
// Creates a fully marked-up AutocompleteMatch from the user's input.
// If |relevance| is negative, calculate a relevance based on heuristics.