summaryrefslogtreecommitdiffstats
path: root/chrome/browser/instant
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 02:59:36 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 02:59:36 +0000
commit98dc01072fbbd8c93d387f4dba8b328a752b1c15 (patch)
treef58eb3d29ac4d1cb7324c648048e4e4369d00c22 /chrome/browser/instant
parent0b5939222f9d18f407c2e28b916dcf5adc63640c (diff)
downloadchromium_src-98dc01072fbbd8c93d387f4dba8b328a752b1c15.zip
chromium_src-98dc01072fbbd8c93d387f4dba8b328a752b1c15.tar.gz
chromium_src-98dc01072fbbd8c93d387f4dba8b328a752b1c15.tar.bz2
Makes predictive with autocompleted text the default. I'm leaving the
three variants in though as I'm going to add to about:flags the ability to choose between them. Because of the time I'm doing the minimal set of changes for Mac and TBRing this. Rohit, could you clean it up when you have a chance? BUG=none TEST=none TBR=estade@chromium.org, rohitra@chromium.org Review URL: http://codereview.chromium.org/5373006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67658 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant')
-rw-r--r--chrome/browser/instant/instant_controller.cc23
1 files changed, 2 insertions, 21 deletions
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index d9653af..fcc55f9 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -56,7 +56,6 @@ void InstantController::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kInstantEnabled, false);
prefs->RegisterBooleanPref(prefs::kInstantEnabledOnce, false);
prefs->RegisterInt64Pref(prefs::kInstantEnabledTime, false);
- prefs->RegisterIntegerPref(prefs::kInstantType, 0);
PromoCounter::RegisterUserPrefs(prefs, prefs::kInstantPromo);
}
@@ -107,15 +106,6 @@ void InstantController::Enable(Profile* profile) {
if (!service)
return;
- // Randomly pick a type. We're doing this to get feedback as to which variant
- // folks prefer.
-#if defined(TOOLKIT_VIEWS)
- int max_type = LAST_TYPE;
-#else
- int max_type = VERBATIM_TYPE;
-#endif
- service->SetInteger(prefs::kInstantType,
- base::RandInt(static_cast<int>(FIRST_TYPE), max_type));
service->SetBoolean(prefs::kInstantEnabled, true);
service->SetBoolean(prefs::kInstantConfirmDialogShown, true);
service->SetInt64(prefs::kInstantEnabledTime,
@@ -532,17 +522,8 @@ bool InstantController::GetType(Profile* profile, Type* type) {
if (!prefs->GetBoolean(prefs::kInstantEnabled))
return false;
- int int_value = prefs->GetInteger(prefs::kInstantType);
- if (int_value < FIRST_TYPE || int_value > LAST_TYPE) {
- // Make sure the value is legal.
- int_value = FIRST_TYPE;
- }
-#if !defined(TOOLKIT_VIEWS)
- // PREDICTIVE_NO_AUTO_COMPLETE_TYPE only makes sense on views.
- if (int_value == PREDICTIVE_NO_AUTO_COMPLETE_TYPE)
- int_value = PREDICTIVE_TYPE;
-#endif
- *type = static_cast<Type>(int_value);
+ // PREDICTIVE_TYPE is the default if enabled via preferences.
+ *type = PREDICTIVE_TYPE;
return true;
}