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

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: 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/search_provider.h
diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h
index eb18fc2b27e967238cd4873398198f61a6f523ab..3d479e00303e3f58043877b2201877a104852e57 100644
--- a/chrome/browser/autocomplete/search_provider.h
+++ b/chrome/browser/autocomplete/search_provider.h
@@ -251,9 +251,16 @@ 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 the
msw 2013/01/23 19:15:19 nit: vertical bars, and i prefer 'verbatim' to 'se
+ // keyword verbatim result is not in |matches_| but can be important in
+ // testing these constraints if has a higher relevance than the best
msw 2013/01/23 19:15:19 nit: "if it"?
+ // 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