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

Side by Side Diff: chrome/browser/autocomplete/shortcuts_provider.h

Issue 17261012: Omnibox: Add Field Trial to Make Shortcuts More Aggressive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 const WordMap& find_words, 87 const WordMap& find_words,
88 const string16& text, 88 const string16& text,
89 const ACMatchClassifications& original_class); 89 const ACMatchClassifications& original_class);
90 90
91 // Returns iterator to first item in |shortcuts_map_| matching |keyword|. 91 // Returns iterator to first item in |shortcuts_map_| matching |keyword|.
92 // Returns shortcuts_map_.end() if there are no matches. 92 // Returns shortcuts_map_.end() if there are no matches.
93 history::ShortcutsBackend::ShortcutMap::const_iterator FindFirstMatch( 93 history::ShortcutsBackend::ShortcutMap::const_iterator FindFirstMatch(
94 const string16& keyword, 94 const string16& keyword,
95 history::ShortcutsBackend* backend); 95 history::ShortcutsBackend* backend);
96 96
97 static int CalculateScore( 97 int CalculateScore(
98 const string16& terms, 98 const string16& terms,
99 const history::ShortcutsBackend::Shortcut& shortcut); 99 const history::ShortcutsBackend::Shortcut& shortcut);
100 100
101 std::string languages_; 101 std::string languages_;
102 bool initialized_; 102 bool initialized_;
103
104 // The maximum relevance that can be assigned in CalculateScore().
105 // Note that if the final assigned relevance is at least
106 // AutocompleteResult::kLowestDefaultScore, the relevance will be
107 // demoted to less than that number because ShortcutsProvider isn't
108 // allowed to inline.
109 int max_relevance_;
103 }; 110 };
104 111
105 #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ 112 #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698