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

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: Dear MAD 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..555849464c75c076070041f0548edc644c00eff5 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -72,10 +72,21 @@ 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;
dhollowa 2013/01/31 21:47:19 How about using a switch here with no "default:" c
robertshield 2013/01/31 22:25:51 Done.
+ if (instant_extended_default_setting == search::INSTANT_FORCE_OFF)
+ instant_extended_value = false;
+ else if (instant_extended_default_setting == search::INSTANT_USE_EXISTING)
+ instant_extended_value = prefs->GetBoolean(prefs::kInstantEnabled);
+
+ 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