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

Unified Diff: chrome/browser/autocomplete/shortcuts_provider.cc

Issue 7314018: Don't autocomplete searches of >1 word if they've only been visited once and the user has not yet... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/history/history_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/shortcuts_provider.cc
===================================================================
--- chrome/browser/autocomplete/shortcuts_provider.cc (revision 92729)
+++ chrome/browser/autocomplete/shortcuts_provider.cc (working copy)
@@ -72,10 +72,11 @@
} // namespace
-// A match needs to score at least 1200 to be default, so set the max below
-// this. For ease of unit testing, make it divisible by 4 (since some tests
-// check for half or quarter of the max score).
-const int ShortcutsProvider::kMaxScore = 1196;
+// For ease of unit testing, make the clamp value divisible by 4 (since some
+// tests check for half or quarter of the max score).
+// static
+const int ShortcutsProvider::kMaxScore =
+ (AutocompleteResult::kLowestDefaultScore - 1) & ~3;
sky 2011/07/15 23:01:34 Wow, that's obscure (the & ~3)
ShortcutsProvider::ShortcutsProvider(ACProviderListener* listener,
Profile* profile)
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/history/history_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698