diff options
author | sreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-06 03:20:14 +0000 |
---|---|---|
committer | sreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-06 03:20:14 +0000 |
commit | 10a57d167dd2836ddbd62e8786a12a344707ac73 (patch) | |
tree | 06a83826189fda5126f329e8df14f423855ba52c /chrome/browser/instant | |
parent | 519dd5c62b24e9bdea4d61e015060bef91c5edb5 (diff) | |
download | chromium_src-10a57d167dd2836ddbd62e8786a12a344707ac73.zip chromium_src-10a57d167dd2836ddbd62e8786a12a344707ac73.tar.gz chromium_src-10a57d167dd2836ddbd62e8786a12a344707ac73.tar.bz2 |
Disable Instant field trial when suggest has been disabled.
When suggest has been disabled, omnibox text is not sent to the default search
engine. Instant's field trial should also be disabled in such a case, to avoid
sending the omnibox text due to Instant.
Note that if the Instant experiment has already been enabled, and *then* the
user disables suggest, this won't disable the experiment immediately (since we
don't listen for changes to prefs::kSuggestEnabled). Instead, it will be
disabled at the next opportunity (some Instant pref changing, browser restart,
etc). I think this is acceptable since, if the user is fiddling with
preferences after Instant has been enabled, they can already click the Instant
checkbox to turn it off.
BUG=91730
TEST=Disable suggest. Verify that the Instant field trial doesn't get enabled.
Review URL: http://codereview.chromium.org/7578014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant')
-rw-r--r-- | chrome/browser/instant/instant_field_trial.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/instant/instant_field_trial.cc b/chrome/browser/instant/instant_field_trial.cc index 2c3e63d..90016ff 100644 --- a/chrome/browser/instant/instant_field_trial.cc +++ b/chrome/browser/instant/instant_field_trial.cc @@ -27,6 +27,7 @@ InstantFieldTrial::Group InstantFieldTrial::GetGroup(Profile* profile) { const PrefService* prefs = profile->GetPrefs(); if (!prefs || + !prefs->GetBoolean(prefs::kSearchSuggestEnabled) || prefs->GetBoolean(prefs::kInstantEnabledOnce) || prefs->IsManagedPreference(prefs::kInstantEnabled)) { return INACTIVE; |