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

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: 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') | chrome/browser/ui/search/search.h » ('J')
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..d559df1e858d5f42d3be8ebae7e065dbbc7dbf8d 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -72,10 +72,22 @@ 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;
+ if (instant_extended_default_setting == search::INSTANT_FORCE_OFF) {
+ instant_extended_value = false;
+ } else if (instant_extended_default_setting == search::INSTANT_USE_EXISTING) {
MAD 2013/01/31 15:44:57 No need for {} here... All one liners...
robertshield 2013/01/31 18:56:52 Done.
+ 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') | chrome/browser/ui/search/search.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698