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

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

Issue 10933023: Control zero suggest with a pref, not a switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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.cc
diff --git a/chrome/browser/autocomplete/autocomplete_controller.cc b/chrome/browser/autocomplete/autocomplete_controller.cc
index 5c8d7720f41461dc2b406da4d9ddaec52302ece1..21a6362c09ab84184e8b02b6e9cb6a15a33d433f 100644
--- a/chrome/browser/autocomplete/autocomplete_controller.cc
+++ b/chrome/browser/autocomplete/autocomplete_controller.cc
@@ -27,7 +27,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/chrome_switches.h"
#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -106,13 +105,13 @@ AutocompleteController::AutocompleteController(
providers_.push_back(new HistoryContentsProvider(this, profile, hqp_enabled));
providers_.push_back(new BuiltinProvider(this, profile));
providers_.push_back(new ExtensionAppProvider(this, profile));
- // Create ZeroSuggest if its switch is present.
- CommandLine* cl = CommandLine::ForCurrentProcess();
- if (cl->HasSwitch(switches::kExperimentalZeroSuggestURLPrefix)) {
- zero_suggest_provider_ = new ZeroSuggestProvider(this, profile,
- cl->GetSwitchValueASCII(switches::kExperimentalZeroSuggestURLPrefix));
+
+ // Create ZeroSuggest if it is enabled.
+ zero_suggest_provider_ = ZeroSuggestProvider::Create(this, profile);
+ if (zero_suggest_provider_) {
providers_.push_back(zero_suggest_provider_);
}
+
for (ACProviders::iterator i(providers_.begin()); i != providers_.end(); ++i)
(*i)->AddRef();
}

Powered by Google App Engine
This is Rietveld 408576698