Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1218)

Unified Diff: components/omnibox/browser/keyword_provider.h

Issue 1411543011: Omnibox: Make Keyword Provide More Generous with Matching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: finish converting AddToMap() calls Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/omnibox/browser/keyword_provider.h
diff --git a/components/omnibox/browser/keyword_provider.h b/components/omnibox/browser/keyword_provider.h
index 3be6313b92879f016bf15535633b11c907052558..e82e6cdd988f7e796e73b4f55f76affd24b03c71 100644
--- a/components/omnibox/browser/keyword_provider.h
+++ b/components/omnibox/browser/keyword_provider.h
@@ -111,12 +111,13 @@ class KeywordProvider : public AutocompleteProvider {
base::string16* remaining_input);
// Determines the relevance for some input, given its type, whether the user
- // typed the complete keyword, and whether the user is in "prefer keyword
- // matches" mode, and whether the keyword supports replacement.
- // If |allow_exact_keyword_match| is false, the relevance for complete
- // keywords that support replacements is degraded.
+ // typed the complete keyword (or close to it), and whether the user is in
+ // "prefer keyword matches" mode, and whether the keyword supports
+ // replacement. If |allow_exact_keyword_match| is false, the relevance for
+ // complete keywords that support replacements is degraded.
static int CalculateRelevance(metrics::OmniboxInputType::Type type,
bool complete,
+ bool sufficiently_complete,
bool support_replacement,
bool prefer_keyword,
bool allow_exact_keyword_match);
@@ -125,6 +126,7 @@ class KeywordProvider : public AutocompleteProvider {
// If |relevance| is negative, calculate a relevance based on heuristics.
AutocompleteMatch CreateAutocompleteMatch(
const TemplateURL* template_url,
+ const size_t meaningful_keyword_length,
const AutocompleteInput& input,
size_t prefix_length,
const base::string16& remaining_input,

Powered by Google App Engine
This is Rietveld 408576698