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

Unified Diff: chrome/browser/autocomplete/keyword_provider.h

Issue 11953016: Omnibox: Better Enforce Suggest Relevance Constraints in Keyword Mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments and spacing Created 7 years, 11 months 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: chrome/browser/autocomplete/keyword_provider.h
diff --git a/chrome/browser/autocomplete/keyword_provider.h b/chrome/browser/autocomplete/keyword_provider.h
index f92f9d3d51052bbaf728dbd4f20031c027b0fc7f..79dc55914ac062e3a20e8f17dec672ea06bce097 100644
--- a/chrome/browser/autocomplete/keyword_provider.h
+++ b/chrome/browser/autocomplete/keyword_provider.h
@@ -93,6 +93,17 @@ class KeywordProvider : public AutocompleteProvider,
bool minimal_changes) OVERRIDE;
virtual void Stop(bool clear_cached_results) OVERRIDE;
+ // 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.
+ static int CalculateRelevance(AutocompleteInput::Type type,
+ bool complete,
+ bool support_replacement,
+ bool prefer_keyword,
+ bool allow_exact_keyword_match);
+
private:
class ScopedEndExtensionKeywordMode;
friend class ScopedEndExtensionKeywordMode;
@@ -116,17 +127,6 @@ class KeywordProvider : public AutocompleteProvider,
const TemplateURL* element,
AutocompleteMatch* match);
- // 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.
- static int CalculateRelevance(AutocompleteInput::Type type,
- bool complete,
- bool support_replacement,
- bool prefer_keyword,
- 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.
AutocompleteMatch CreateAutocompleteMatch(TemplateURLService* model,
« no previous file with comments | « no previous file | chrome/browser/autocomplete/keyword_provider.cc » ('j') | chrome/browser/autocomplete/search_provider.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698