diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-26 11:10:31 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-26 11:10:31 +0000 |
commit | c3e113bb2d05faae0871fb593a20c7f772c394e7 (patch) | |
tree | 453780dad2bdfddf844b38e9cd38fb7476dbcf8a /chrome/browser/autocomplete/autocomplete.h | |
parent | 113f3910e87fa07dafe009ed57a9aa4aa6865a0f (diff) | |
download | chromium_src-c3e113bb2d05faae0871fb593a20c7f772c394e7.zip chromium_src-c3e113bb2d05faae0871fb593a20c7f772c394e7.tar.gz chromium_src-c3e113bb2d05faae0871fb593a20c7f772c394e7.tar.bz2 |
Revert 94073 (broke a ton of tests) - Introduce a field trial for Instant.
Add a field trial for Instant, opting in 10% of undecided users into the
experiment. "Undecided" means that users who have played with the Instant
checkbox (in Preferences -> Basics) will be excluded from the field trial. When
Instant is turned on in this manner, it's restricted to search (i.e., other
non-search URLs are not previewed).
If the user is selected into the experiment, the checkbox state in preferences
will accurately reflect that Instant is on, even if the user didn't enable it
explicitly.
Although the experiment enables the "Restrict Instant to Search" functionality,
it's not reflected in about:flags. I consider this deficiency to be minor,
since (i) most users won't check about:flags anyway, and (ii) about:flags is
already inconsistent in other ways (for example, it also doesn't show if you
added --restrict-instant-to-search manually).
Similarly for --preload-instant-search, which preloads the default search
engine's homepage when the omnibox gets keyboard focus.
We respect group policy. If prefs::kInstantEnabled is a managed pref, the field
trial will not affect the user.
We store the actual random number generated for the user in a pref so that the
same user gets the same experience across browser restarts (i.e., one-time
randomization). This also allows us to change (through a Chrome update) the
percentages allocated to different groups and thus allocate users to groups
differently. If we only stored the final determination of the user's group in
the pref, changing the group percentages would have no effect.
The code doesn't use base::FieldTrial, because this experiment needs one-time
randomization, and base::FieldTrial only supports it if the user has opted-in
to UMA (see http://codereview.chromium.org/7360001/ for some context).
There is no explicit expiry date for this experiment. The experiment can be
disabled by updating the field trial percentages in instant_field_trial.cc and
shipping an update to Chrome (not much different from how base::FieldTrial also
requires new builds to expire experiments).
BUG=none
TEST=Delete profile and restart Chrome enough times to see that Instant is ON
by default about 10% of the time; fiddling with the preferences checkbox gives
expected results.
Review URL: http://codereview.chromium.org/7337007
TBR=sreeram@chromium.org
Review URL: http://codereview.chromium.org/7461075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete.h')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h index 487e8bc..2a19545 100644 --- a/chrome/browser/autocomplete/autocomplete.h +++ b/chrome/browser/autocomplete/autocomplete.h @@ -599,14 +599,13 @@ class AutocompleteController : public ACProviderListener { AutocompleteController(Profile* profile, AutocompleteControllerDelegate* delegate); #ifdef UNIT_TEST - AutocompleteController(const ACProviders& providers, Profile* profile) + explicit AutocompleteController(const ACProviders& providers) : delegate_(NULL), providers_(providers), keyword_provider_(NULL), search_provider_(NULL), done_(true), - in_start_(false), - profile_(profile) { + in_start_(false) { } #endif ~AutocompleteController(); @@ -729,8 +728,6 @@ class AutocompleteController : public ACProviderListener { // notifications until Start() has been invoked on all providers. bool in_start_; - Profile* profile_; - DISALLOW_COPY_AND_ASSIGN(AutocompleteController); }; |