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

Unified Diff: components/omnibox/browser/search_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/search_provider.h
diff --git a/components/omnibox/browser/search_provider.h b/components/omnibox/browser/search_provider.h
index 26806309a0e0347cd35d542646d239bb403b5d57..259e7c6067d2d3c0bb64c420222eb8d80a5d55b4 100644
--- a/components/omnibox/browser/search_provider.h
+++ b/components/omnibox/browser/search_provider.h
@@ -66,6 +66,15 @@ class SearchProvider : public BaseSearchProvider,
// match for Autocomplete and registers the contained answer data, if any.
void RegisterDisplayedAnswers(const AutocompleteResult& result);
+ // Calculates the relevance score for the keyword verbatim result (if the
+ // input matches one of the profile's keywords). If
+ // |allow_exact_keyword_match| is false, the relevance for complete
+ // keywords that support replacements is degraded.
+ static int CalculateRelevanceForKeywordVerbatim(
+ metrics::OmniboxInputType::Type type,
+ bool allow_exact_keyword_match,
+ bool prefer_keyword);
+
// AutocompleteProvider:
void ResetSession() override;
@@ -142,12 +151,6 @@ class SearchProvider : public BaseSearchProvider,
typedef std::vector<history::KeywordSearchTermVisit> HistoryResults;
- // Calculates the relevance score for the keyword verbatim result (if the
- // input matches one of the profile's keyword).
- static int CalculateRelevanceForKeywordVerbatim(
- metrics::OmniboxInputType::Type type,
- bool prefer_keyword);
-
// A helper function for UpdateAllOldResults().
static void UpdateOldResults(bool minimal_changes,
SearchSuggestionParser::Results* results);

Powered by Google App Engine
This is Rietveld 408576698