Commit 10a57d16 authored by sreeram@chromium.org's avatar sreeram@chromium.org

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
parent 519dd5c6
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment