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

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: Fix for clang compile error. 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/zero_suggest_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_controller.cc
diff --git a/chrome/browser/autocomplete/autocomplete_controller.cc b/chrome/browser/autocomplete/autocomplete_controller.cc
index cc5d2b48b81ec9546f8d39e36a5f44a0e64bedae..14bf7c1f26962f4795b416d951e1728cf33b2c96 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"
@@ -131,11 +130,9 @@ AutocompleteController::AutocompleteController(
if (provider_types & AutocompleteProvider::TYPE_SHORTCUTS)
providers_.push_back(new ShortcutsProvider(this, profile));
- CommandLine* cl = CommandLine::ForCurrentProcess();
- if ((provider_types & AutocompleteProvider::TYPE_ZERO_SUGGEST) &&
- 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_);
}
« no previous file with comments | « no previous file | chrome/browser/autocomplete/zero_suggest_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698