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

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

Issue 291005: Allow the history URL provider to handle input of type QUERY. This helps in ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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.cc
===================================================================
--- chrome/browser/autocomplete/keyword_provider.cc (revision 29226)
+++ chrome/browser/autocomplete/keyword_provider.cc (working copy)
@@ -234,24 +234,11 @@
int KeywordProvider::CalculateRelevance(AutocompleteInput::Type type,
bool complete,
bool no_query_text_needed) {
- if (complete && no_query_text_needed)
+ if (!complete)
+ return (type == AutocompleteInput::URL) ? 700 : 450;
+ if (no_query_text_needed)
return 1500;
-
- switch (type) {
- case AutocompleteInput::UNKNOWN:
- case AutocompleteInput::REQUESTED_URL:
- return complete ? 1100 : 450;
-
- case AutocompleteInput::URL:
- return complete ? 1100 : 700;
-
- case AutocompleteInput::QUERY:
- return complete ? 1400 : 650;
-
- default:
- NOTREACHED();
- return 0;
- }
+ return (type == AutocompleteInput::QUERY) ? 1450 : 1100;
}
AutocompleteMatch KeywordProvider::CreateAutocompleteMatch(

Powered by Google App Engine
This is Rietveld 408576698