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

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 12094073: Use an experiment value to set the instant_extended.enabled pref default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedbac Created 7 years, 11 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/ui/search/search.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_instant_controller.cc
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc
index 7abe3aa900015a2cc93088f32a243fdf112b7983..4118de59b0de8e390a68fa3136e01b1275fbafad 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -72,10 +72,27 @@ bool BrowserInstantController::IsInstantEnabled(Profile* profile) {
void BrowserInstantController::RegisterUserPrefs(PrefServiceSyncable* prefs) {
prefs->RegisterBooleanPref(prefs::kInstantConfirmDialogShown, false,
PrefServiceSyncable::SYNCABLE_PREF);
- prefs->RegisterBooleanPref(prefs::kInstantExtendedEnabled, true,
- PrefServiceSyncable::SYNCABLE_PREF);
prefs->RegisterBooleanPref(prefs::kInstantEnabled, false,
PrefServiceSyncable::SYNCABLE_PREF);
+
+ search::InstantExtendedDefault instant_extended_default_setting =
+ search::GetInstantExtendedDefaultSetting();
+
+ bool instant_extended_value = true;
+ switch (instant_extended_default_setting) {
+ case search::INSTANT_FORCE_ON:
+ break;
+ case search::INSTANT_USE_EXISTING:
+ instant_extended_value = prefs->GetBoolean(prefs::kInstantEnabled);
+ break;
+ case search::INSTANT_FORCE_OFF:
+ instant_extended_value = false;
+ break;
+ }
+
+ prefs->RegisterBooleanPref(prefs::kInstantExtendedEnabled,
+ instant_extended_value,
+ PrefServiceSyncable::SYNCABLE_PREF);
}
bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition) {
« no previous file with comments | « no previous file | chrome/browser/ui/search/search.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698