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

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

Issue 10909130: autocomplete: Add AutocompleteProvider::Type enum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update comments Created 8 years, 3 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
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_HISTORY_URL_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // This class is an autocomplete provider and is also a pseudo-internal 135 // This class is an autocomplete provider and is also a pseudo-internal
136 // component of the history system. See comments above. 136 // component of the history system. See comments above.
137 class HistoryURLProvider : public HistoryProvider { 137 class HistoryURLProvider : public HistoryProvider {
138 public: 138 public:
139 HistoryURLProvider(AutocompleteProviderListener* listener, Profile* profile); 139 HistoryURLProvider(AutocompleteProviderListener* listener, Profile* profile);
140 140
141 #ifdef UNIT_TEST 141 #ifdef UNIT_TEST
142 HistoryURLProvider(AutocompleteProviderListener* listener, 142 HistoryURLProvider(AutocompleteProviderListener* listener,
143 Profile* profile, 143 Profile* profile,
144 const std::string& languages) 144 const std::string& languages)
145 : HistoryProvider(listener, profile, "History"), 145 : HistoryProvider(listener,
146 profile,
147 AutocompleteProvider::TYPE_HISTORY_URL),
146 params_(NULL), 148 params_(NULL),
147 languages_(languages) {} 149 languages_(languages) {}
148 #endif 150 #endif
149 151
150 // Returns a match corresponding to exactly what the user has typed. 152 // Returns a match corresponding to exactly what the user has typed.
151 // NOTE: This does not set the relevance of the returned match, as different 153 // NOTE: This does not set the relevance of the returned match, as different
152 // callers want different behavior. Callers must set this manually. 154 // callers want different behavior. Callers must set this manually.
153 // This function is static so SearchProvider may construct similar matches. 155 // This function is static so SearchProvider may construct similar matches.
154 static AutocompleteMatch SuggestExactInput(AutocompleteProvider* provider, 156 static AutocompleteMatch SuggestExactInput(AutocompleteProvider* provider,
155 const AutocompleteInput& input, 157 const AutocompleteInput& input,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // parameter itself is freed once it's no longer needed. The only reason we 280 // parameter itself is freed once it's no longer needed. The only reason we
279 // keep this member is so we can set the cancel bit on it. 281 // keep this member is so we can set the cancel bit on it.
280 HistoryURLProviderParams* params_; 282 HistoryURLProviderParams* params_;
281 283
282 // Only used by unittests; if non-empty, overrides accept-languages in the 284 // Only used by unittests; if non-empty, overrides accept-languages in the
283 // profile's pref system. 285 // profile's pref system.
284 std::string languages_; 286 std::string languages_;
285 }; 287 };
286 288
287 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ 289 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698