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

Issue 7337007: Introduce a field trial for Instant. (Closed)

Created:
9 years, 5 months ago by sreeram
Modified:
9 years, 5 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=94073

Patch Set 1 #

Total comments: 4

Patch Set 2 : Uses static class methods and enums #

Patch Set 3 : New and improved #

Patch Set 4 : Added opt-out histogram #

Total comments: 8

Patch Set 5 : Quantized random number #

Patch Set 6 : Test fix #

Patch Set 7 : Updated prefs handling #

Patch Set 8 : Diff against 7396025 #

Total comments: 6

Patch Set 9 : Addressed estade's comments #

Patch Set 10 : Actually handle the onchange of the field trial checkbox #

Patch Set 11 : Fix onchange handling #

Total comments: 9

Patch Set 12 : Addressed scr's comments #

Patch Set 13 : Added TODO(scr) as requested #

Patch Set 14 : Reverting ifdef'ed constructor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+199 lines, -14 lines) Patch
M chrome/browser/autocomplete/autocomplete.h View 1 2 12 13 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete.cc View 1 2 12 13 4 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_unittest.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/autocomplete/search_provider_unittest.cc View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/instant/instant_controller.cc View 1 2 3 4 5 6 7 8 chunks +23 lines, -7 lines 0 comments Download
A chrome/browser/instant/instant_field_trial.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/instant/instant_field_trial.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +47 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/browser_options.html View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/browser_options.js View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +33 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.cc View 1 2 3 4 5 6 7 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/data/webui/options.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/functional/instant.py View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
sreeram
Please review. I still need to fix several things, but I'd like your early look ...
9 years, 5 months ago (2011-07-12 00:07:52 UTC) #1
sky
http://codereview.chromium.org/7337007/diff/1/chrome/browser/autocomplete/autocomplete.h File chrome/browser/autocomplete/autocomplete.h (right): http://codereview.chromium.org/7337007/diff/1/chrome/browser/autocomplete/autocomplete.h#newcode603 chrome/browser/autocomplete/autocomplete.h:603: explicit AutocompleteController(const ACProviders& providers, no explicit http://codereview.chromium.org/7337007/diff/1/chrome/browser/instant/instant_field_trial.h File chrome/browser/instant/instant_field_trial.h ...
9 years, 5 months ago (2011-07-12 00:37:49 UTC) #2
sky
Also, 50% seems very large. I thought Brian wanted something like .1%? You should run ...
9 years, 5 months ago (2011-07-12 00:39:05 UTC) #3
sreeram
http://codereview.chromium.org/7337007/diff/1/chrome/browser/autocomplete/autocomplete.h File chrome/browser/autocomplete/autocomplete.h (right): http://codereview.chromium.org/7337007/diff/1/chrome/browser/autocomplete/autocomplete.h#newcode603 chrome/browser/autocomplete/autocomplete.h:603: explicit AutocompleteController(const ACProviders& providers, On 2011/07/12 00:37:50, sky wrote: ...
9 years, 5 months ago (2011-07-12 03:36:17 UTC) #4
sreeram
On Mon, Jul 11, 2011 at 17:39, <sky@chromium.org> wrote: > Also, 50% seems very large. ...
9 years, 5 months ago (2011-07-12 03:37:50 UTC) #5
sky
I vote for an enum then. Also, I think you should have a class with ...
9 years, 5 months ago (2011-07-12 03:42:56 UTC) #6
sreeram
On 2011/07/12 03:42:56, sky wrote: > I vote for an enum then. Done. > Also, ...
9 years, 5 months ago (2011-07-12 19:49:52 UTC) #7
sreeram
Please review. I'd like to try and get this in for M14 (by the Friday ...
9 years, 5 months ago (2011-07-21 16:34:19 UTC) #8
sky
The instant changes LGTM
9 years, 5 months ago (2011-07-21 16:59:10 UTC) #9
Evan Stade
this seems to involve changes from http://codereview.chromium.org/7396025/ , is there anything new you'd like me ...
9 years, 5 months ago (2011-07-21 22:42:11 UTC) #10
Evan Stade
also, I gather by your m14 push you want this to go into stable. Out ...
9 years, 5 months ago (2011-07-21 22:43:39 UTC) #11
jar (doing other things)
http://codereview.chromium.org/7337007/diff/11001/chrome/browser/autocomplete/autocomplete.cc File chrome/browser/autocomplete/autocomplete.cc (right): http://codereview.chromium.org/7337007/diff/11001/chrome/browser/autocomplete/autocomplete.cc#newcode888 chrome/browser/autocomplete/autocomplete.cc:888: base::IntToString(text.length()); I'm not fully clear on the value of ...
9 years, 5 months ago (2011-07-22 01:42:17 UTC) #12
sreeram
On Thu, Jul 21, 2011 at 15:42, <estade@chromium.org> wrote: > this seems to involve changes ...
9 years, 5 months ago (2011-07-22 14:12:29 UTC) #13
sreeram
On Thu, Jul 21, 2011 at 15:43, <estade@chromium.org> wrote: > also, I gather by your ...
9 years, 5 months ago (2011-07-22 14:19:47 UTC) #14
sreeram
http://codereview.chromium.org/7337007/diff/11001/chrome/browser/autocomplete/autocomplete.cc File chrome/browser/autocomplete/autocomplete.cc (right): http://codereview.chromium.org/7337007/diff/11001/chrome/browser/autocomplete/autocomplete.cc#newcode888 chrome/browser/autocomplete/autocomplete.cc:888: base::IntToString(text.length()); On 2011/07/22 01:42:17, jar wrote: > I'm not ...
9 years, 5 months ago (2011-07-22 14:31:16 UTC) #15
sreeram
@sky: No substantial changes from before. @estade: Updated to reflect the latest patch in http://codereview.chromium.org/7396025/. ...
9 years, 5 months ago (2011-07-25 14:59:17 UTC) #16
Evan Stade
On 2011/07/25 14:59:17, sreeram wrote: > @sky: No substantial changes from before. > > @estade: ...
9 years, 5 months ago (2011-07-25 23:09:14 UTC) #17
sreeram
On 2011/07/25 23:09:14, Evan Stade wrote: > git cl upload [branchname to diff against] Done.
9 years, 5 months ago (2011-07-26 00:07:27 UTC) #18
Evan Stade
http://codereview.chromium.org/7337007/diff/11007/chrome/browser/resources/options/browser_options.html File chrome/browser/resources/options/browser_options.html (right): http://codereview.chromium.org/7337007/diff/11007/chrome/browser/resources/options/browser_options.html#newcode97 chrome/browser/resources/options/browser_options.html:97: <input id="instantFieldTrialCheckbox" type="checkbox"> by default should be hidden. http://codereview.chromium.org/7337007/diff/11007/chrome/browser/resources/options/browser_options.js ...
9 years, 5 months ago (2011-07-26 00:10:20 UTC) #19
sreeram
http://codereview.chromium.org/7337007/diff/11007/chrome/browser/resources/options/browser_options.html File chrome/browser/resources/options/browser_options.html (right): http://codereview.chromium.org/7337007/diff/11007/chrome/browser/resources/options/browser_options.html#newcode97 chrome/browser/resources/options/browser_options.html:97: <input id="instantFieldTrialCheckbox" type="checkbox"> On 2011/07/26 00:10:21, Evan Stade wrote: ...
9 years, 5 months ago (2011-07-26 02:45:53 UTC) #20
Sheridan Rawlins
http://codereview.chromium.org/7337007/diff/20023/chrome/browser/instant/instant_field_trial.h File chrome/browser/instant/instant_field_trial.h (right): http://codereview.chromium.org/7337007/diff/20023/chrome/browser/instant/instant_field_trial.h#newcode39 chrome/browser/instant/instant_field_trial.h:39: static bool IsExperimentGroup(Profile* profile) { Move this to .cc ...
9 years, 5 months ago (2011-07-26 07:07:15 UTC) #21
Sheridan Rawlins
http://codereview.chromium.org/7337007/diff/20023/chrome/browser/autocomplete/autocomplete.h File chrome/browser/autocomplete/autocomplete.h (right): http://codereview.chromium.org/7337007/diff/20023/chrome/browser/autocomplete/autocomplete.h#newcode602 chrome/browser/autocomplete/autocomplete.h:602: AutocompleteController(const ACProviders& providers, Profile* profile) Can you move this ...
9 years, 5 months ago (2011-07-26 07:16:59 UTC) #22
sreeram
http://codereview.chromium.org/7337007/diff/20023/chrome/browser/autocomplete/autocomplete.h File chrome/browser/autocomplete/autocomplete.h (right): http://codereview.chromium.org/7337007/diff/20023/chrome/browser/autocomplete/autocomplete.h#newcode602 chrome/browser/autocomplete/autocomplete.h:602: AutocompleteController(const ACProviders& providers, Profile* profile) On 2011/07/26 07:16:59, Sheridan ...
9 years, 5 months ago (2011-07-26 07:36:10 UTC) #23
Sheridan Rawlins
LGTM for the review of the state after addressing others' concerns and double checking memory ...
9 years, 5 months ago (2011-07-26 08:03:58 UTC) #24
sreeram
http://codereview.chromium.org/7337007/diff/20023/chrome/browser/autocomplete/autocomplete.h File chrome/browser/autocomplete/autocomplete.h (right): http://codereview.chromium.org/7337007/diff/20023/chrome/browser/autocomplete/autocomplete.h#newcode602 chrome/browser/autocomplete/autocomplete.h:602: AutocompleteController(const ACProviders& providers, Profile* profile) On 2011/07/26 07:36:10, sreeram ...
9 years, 5 months ago (2011-07-26 08:23:35 UTC) #25
commit-bot: I haz the power
Change committed as 94073
9 years, 5 months ago (2011-07-26 10:10:50 UTC) #26
willchan no longer on Chromium
On 2011/07/26 10:10:50, I haz the power (commit-bot) wrote: > Change committed as 94073 linux/mac/win ...
9 years, 5 months ago (2011-07-26 11:09:21 UTC) #27
sreeram
On Tue, Jul 26, 2011 at 04:09, <willchan@chromium.org> wrote: > On 2011/07/26 10:10:50, I haz ...
9 years, 5 months ago (2011-07-26 13:38:29 UTC) #28
willchan no longer on Chromium
9 years, 5 months ago (2011-07-26 13:43:10 UTC) #29
Np, it's fixed now. The commit-bot doesn't run browser_tests because
of flake. If you suspect a test is flaky, try running a tryjob again
and seeing if it goes away. Also try building browser_tests yourself
and running it to see if it fails on you.

Cheers.

On Tue, Jul 26, 2011 at 4:37 PM, Sreeram Ramachandran
<sreeram@chromium.org> wrote:
> On Tue, Jul 26, 2011 at 04:09,  <willchan@chromium.org> wrote:
>> On 2011/07/26 10:10:50, I haz the power (commit-bot) wrote:
>>>
>>> Change committed as 94073
>>
>> linux/mac/win trybots failed horribly on this changelist and it got sent to
>> the
>> commit-bot anyway...why? The tree is flaming red now.
>>
>> http://codereview.chromium.org/7337007/
>
> Sorry about that. Thanks for reverting it. I was under the impression
> that the commit bot would reject the CL if things didn't work. I'd
> been seeing a lot of flaky tests from the try bots, and so didn't
> realize that I should have been more careful.
>

Powered by Google App Engine
This is Rietveld 408576698