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

Unified Diff: chrome/browser/autocomplete/autocomplete_controller.h

Issue 10909130: autocomplete: Add AutocompleteProvider::Type enum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add !! for windows 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/autocomplete_controller.h
diff --git a/chrome/browser/autocomplete/autocomplete_controller.h b/chrome/browser/autocomplete/autocomplete_controller.h
index c66d024402b98bfdeb0c4485b448c26fcaeb1d77..d974d53683b78e1baf1ebd08ea7c284d484d9468 100644
--- a/chrome/browser/autocomplete/autocomplete_controller.h
+++ b/chrome/browser/autocomplete/autocomplete_controller.h
@@ -46,23 +46,12 @@ class AutocompleteController : public AutocompleteProviderListener {
// Used to indicate an index that is not selected in a call to Update().
static const int kNoItemSelected;
- // Normally, you will call the first constructor. Unit tests can use the
- // second to set the providers to some known testing providers. The default
- // providers will be overridden and the controller will take ownership of the
- // providers, Release()ing them on destruction.
+ // |provider_types| is a bitmap containing AutocompleteProvider::Type values
+ // that will (potentially, depending on platform, flags, etc.) be
+ // instantiated.
AutocompleteController(Profile* profile,
- AutocompleteControllerDelegate* delegate);
-#ifdef UNIT_TEST
- AutocompleteController(const ACProviders& providers, Profile* profile)
- : delegate_(NULL),
- providers_(providers),
- keyword_provider_(NULL),
- search_provider_(NULL),
- done_(true),
- in_start_(false),
- profile_(profile) {
- }
-#endif
+ AutocompleteControllerDelegate* delegate,
+ int provider_types);
~AutocompleteController();
// Starts an autocomplete query, which continues until all providers are
@@ -128,14 +117,6 @@ class AutocompleteController : public AutocompleteProviderListener {
// the popup to ensure it's not showing an out-of-date query.
void ExpireCopiedEntries();
-#ifdef UNIT_TEST
- void set_search_provider(SearchProvider* provider) {
- search_provider_ = provider;
- }
- void set_keyword_provider(KeywordProvider* provider) {
- keyword_provider_ = provider;
- }
-#endif
SearchProvider* search_provider() const { return search_provider_; }
KeywordProvider* keyword_provider() const { return keyword_provider_; }
@@ -161,6 +142,9 @@ class AutocompleteController : public AutocompleteProviderListener {
RedundantKeywordsIgnoredInResult);
FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, UpdateAssistedQueryStats);
+ friend class SearchProviderTest;
+ FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, UpdateKeywordDescriptions);
+
// Updates |result_| to reflect the current provider state. Resets timers and
// fires notifications as necessary. |is_synchronous_pass| is true only when
// Start() is calling this to get the synchronous result.
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_classifier.cc ('k') | chrome/browser/autocomplete/autocomplete_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698