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

Unified Diff: chrome/browser/autocomplete/search_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: 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/search_provider.h
diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h
index eb18fc2b27e967238cd4873398198f61a6f523ab..c09dad3550d84778ca5af2ea1597ce0b8856f7eb 100644
--- a/chrome/browser/autocomplete/search_provider.h
+++ b/chrome/browser/autocomplete/search_provider.h
@@ -251,9 +251,15 @@ class SearchProvider : public AutocompleteProvider,
// Checks if suggested relevances violate certain expected constraints.
// See UpdateMatches() for the use and explanation of these constraints.
- bool IsTopMatchScoreTooLow() const;
- bool IsTopMatchHighRankSearchForURL() const;
- bool IsTopMatchNotInlinable() const;
+ // We pass in keyword_search_what_you_typed_relevance because it is not
+ // in |matches_| but can be important in testing these constraints if
+ // its high-ranked than the best result in |matches_|.
+ bool IsTopMatchScoreTooLow(
+ int keyword_search_what_you_typed_relevance) const;
+ bool IsTopMatchHighRankSearchForURL(
+ int keyword_search_what_you_typed_relevance) const;
+ bool IsTopMatchNotInlinable(
+ int keyword_search_what_you_typed_relevance) const;
// Updates |matches_| from the latest results; applies calculated relevances
// if suggested relevances cause undesriable behavior. Updates |done_|.

Powered by Google App Engine
This is Rietveld 408576698