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

Issue 6883102: Add one-time randomization support for FieldTrial, and the ability to (Closed)

Created:
9 years, 8 months ago by Jói
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Add one-time randomization support for FieldTrial, and the ability to disable field trials. I am going to have a need for both soon. Update some documentation about empty trial names, add TrialExists() method and update many call-sites to use this (it simplifies the previous logic which checked for existence and then for non-empty name, which can no longer happen). Refactor a bit in browser_main. While I'm in there and needing base/OWNERS approval, add an OWNERS file for base/metrics that adds jar@chromium.org as an owner for that directory. Initially committed as r84197. Rolled back due to DCHECK in official builds, r84373. Will re-submit with fix. BUG=81750 TEST=base_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=84801

Patch Set 1 #

Total comments: 22

Patch Set 2 : Fix compilation niggles from real(tm) compilers. #

Patch Set 3 : Use Disbale() in one more place. #

Patch Set 4 : Address review comments. Switch to UMA ID. Update more documentation. #

Patch Set 5 : Unit test cancel support. #

Total comments: 26

Patch Set 6 : Responding to review comments. Fix initialization in browser_main. #

Patch Set 7 : Responding to review comments. Fix initialization in browser_main. #

Total comments: 5

Patch Set 8 : Update based on review comments. Add passing of client_id to renderer. #

Patch Set 9 : Update comments. #

Total comments: 16

Patch Set 10 : Respond to review comments. #

Total comments: 5

Patch Set 11 : Fix comment in base/rand_util.h #

Patch Set 12 : Merge to head. #

Patch Set 13 : Merge to head. #

Patch Set 14 : Fix DCHECK seen in official builds. #

Patch Set 15 : Merge to head. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+454 lines, -172 lines) Patch
A base/metrics/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M base/metrics/field_trial.h View 1 2 3 4 5 6 7 8 9 15 chunks +85 lines, -30 lines 0 comments Download
M base/metrics/field_trial.cc View 1 2 3 4 5 6 7 8 9 10 11 chunks +85 lines, -13 lines 0 comments Download
M base/metrics/field_trial_unittest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +118 lines, -7 lines 0 comments Download
M base/rand_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M base/rand_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/browser_main.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +23 lines, -3 lines 0 comments Download
M chrome/browser/browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +82 lines, -60 lines 0 comments Download
M chrome/browser/metrics/metrics_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/metrics/metrics_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/page_load_histograms.cc View 1 2 3 4 5 6 7 11 chunks +21 lines, -28 lines 0 comments Download
M chrome/renderer/prerender/prerender_helper.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M content/renderer/renderer_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -2 lines 0 comments Download
M net/base/host_resolver_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -6 lines 0 comments Download
M net/http/http_cache_transaction.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -5 lines 0 comments Download
M net/socket/client_socket_pool_histograms.cc View 1 2 3 4 5 6 2 chunks +3 lines, -5 lines 0 comments Download
M net/socket/ssl_client_socket_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -3 lines 0 comments Download
M net/socket/stream_socket.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -3 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
Jói
Jim, I will wait for your LGTM before asking someone from base/OWNERS to rubber stamp. ...
9 years, 8 months ago (2011-04-20 22:57:04 UTC) #1
jar (doing other things)
Thanks for cleaning up a number of typos an nits already in these files! I ...
9 years, 8 months ago (2011-04-21 01:03:50 UTC) #2
Jói
Thanks Jim. To summarize the conclusion of our discussion on the phone: Using the UMA ...
9 years, 8 months ago (2011-04-21 02:16:47 UTC) #3
Jói
Hi Jim, Please take another look. I've switched to using the UMA ID, added initialization ...
9 years, 8 months ago (2011-04-21 19:50:33 UTC) #4
Jói
http://codereview.chromium.org/6883102/diff/3025/chrome/browser/browser_main.cc File chrome/browser/browser_main.cc (right): http://codereview.chromium.org/6883102/diff/3025/chrome/browser/browser_main.cc#newcode1332 chrome/browser/browser_main.cc:1332: // browser::RegisterLocalState() above. Whoops, my bad, that's not where ...
9 years, 8 months ago (2011-04-21 20:22:59 UTC) #5
Jói
Jim, quick question: It sort of looks like I could move InitializeMetricsService up to before ...
9 years, 8 months ago (2011-04-21 20:37:08 UTC) #6
jar (doing other things)
http://codereview.chromium.org/6883102/diff/3025/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): http://codereview.chromium.org/6883102/diff/3025/base/metrics/field_trial.cc#newcode338 base/metrics/field_trial.cc:338: return EmptyString(); If you switch over to using a ...
9 years, 8 months ago (2011-04-21 22:10:02 UTC) #7
Paweł Hajdan Jr.
Drive-by with a test-related comment. No need to wait for me if you just use ...
9 years, 8 months ago (2011-04-26 10:23:10 UTC) #8
Jói
Hi Jim, I'm finally back from the 4-day weekend here in Canada, and from dealing ...
9 years, 8 months ago (2011-04-28 01:03:50 UTC) #9
jar (doing other things)
Thanks for cleaning up the pattern of usage for FieldTrials. It is really helpful to ...
9 years, 8 months ago (2011-04-29 00:57:11 UTC) #10
Jói
Thanks Jim. Wighout looking at the code I guess I can switch the FieldTrialList object ...
9 years, 8 months ago (2011-04-29 01:29:41 UTC) #11
Jói
Please take another look. Cheers, Jói http://codereview.chromium.org/6883102/diff/3025/base/metrics/field_trial.h File base/metrics/field_trial.h (left): http://codereview.chromium.org/6883102/diff/3025/base/metrics/field_trial.h#oldcode57 base/metrics/field_trial.h:57: // !base::FieldTrialList::Find("MemoryExperiment")->group_name().empty()); On ...
9 years, 7 months ago (2011-05-02 18:55:03 UTC) #12
Jói
Adding mark@chromium.org as reviewer for base/OWNERS approval; this would primarily be the change to base/rand_util.* ...
9 years, 7 months ago (2011-05-02 19:34:05 UTC) #13
Mark Mentovai
LGTM for base approval, I looked at the files in base only, and defer to ...
9 years, 7 months ago (2011-05-02 19:39:58 UTC) #14
jar (doing other things)
FWIW, the review uncovered a micro-bug below in the pre-existing code (see below). I also ...
9 years, 7 months ago (2011-05-03 00:17:47 UTC) #15
Jói
I think that should be it, please take a look. Cheers, Jói http://codereview.chromium.org/6883102/diff/15004/base/metrics/field_trial.cc File base/metrics/field_trial.cc ...
9 years, 7 months ago (2011-05-03 17:41:47 UTC) #16
jar (doing other things)
LGTM Thanks!
9 years, 7 months ago (2011-05-03 20:08:14 UTC) #17
Jói
Adding Wan-Teh for net/OWNERS approval.
9 years, 7 months ago (2011-05-04 17:37:05 UTC) #18
wtc
LGTM. I only reviewed the changes to base/rand_util{h,cc} and net. http://codereview.chromium.org/6883102/diff/24001/base/metrics/OWNERS File base/metrics/OWNERS (right): http://codereview.chromium.org/6883102/diff/24001/base/metrics/OWNERS#newcode1 ...
9 years, 7 months ago (2011-05-04 17:58:05 UTC) #19
Jói
Thanks Wan-Teh. Jim, please see question below. Cheers, Jói http://codereview.chromium.org/6883102/diff/24001/base/metrics/OWNERS File base/metrics/OWNERS (right): http://codereview.chromium.org/6883102/diff/24001/base/metrics/OWNERS#newcode1 base/metrics/OWNERS:1: ...
9 years, 7 months ago (2011-05-04 20:02:09 UTC) #20
Mark Mentovai
http://codereview.chromium.org/6883102/diff/24001/base/metrics/OWNERS File base/metrics/OWNERS (right): http://codereview.chromium.org/6883102/diff/24001/base/metrics/OWNERS#newcode1 base/metrics/OWNERS:1: jar@chromium.org Please don’t “set noparent” any OWNERS file that ...
9 years, 7 months ago (2011-05-04 20:21:24 UTC) #21
Jói
Good point - I won't be adding "set noparent" to the OWNERS file. I've uploaded ...
9 years, 7 months ago (2011-05-04 20:33:03 UTC) #22
jar (doing other things)
Still LGTM Mark's comment is good... let's not no-parent.
9 years, 7 months ago (2011-05-04 20:54:46 UTC) #23
Jói
Adding jam@ for rubber-stamp content/OWNERS approval of the one trivial call-site change under content/. Will ...
9 years, 7 months ago (2011-05-05 02:19:08 UTC) #24
Jói
http://codereview.chromium.org/6883102/diff/2004/chrome/browser/browser_main.cc File chrome/browser/browser_main.cc (right): http://codereview.chromium.org/6883102/diff/2004/chrome/browser/browser_main.cc#newcode1330 chrome/browser/browser_main.cc:1330: MetricsService* metrics = InitializeMetrics(parsed_command_line, local_state); On 2011/04/29 00:57:11, jar ...
9 years, 7 months ago (2011-05-05 15:07:39 UTC) #25
Jói
Adding ukai@chromium.org to review change in initialization of websocket experiment. Ukai-san, the only true delta ...
9 years, 7 months ago (2011-05-06 19:48:59 UTC) #26
ukai
9 years, 7 months ago (2011-05-10 01:46:14 UTC) #27
On 2011/05/06 19:48:59, Jói wrote:
> Adding mailto:ukai@chromium.org to review change in initialization of
websocket
> experiment.
> 
> Ukai-san, the only true delta in this latest patch is what you'll see behind
> these two links:
>
http://codereview.chromium.org/6883102/diff2/29002:38001/chrome/browser/brows...
>
http://codereview.chromium.org/6883102/diff2/29002:38001/chrome/browser/brows...
> 
> Everything else has previously been reviewed by others on this thread.  Any
> other deltas between patch set 14 and patch set 13 (which I committed
yesterday
> but rolled back due to http://crbug.com/81750) are simply from merging to a
> later version of the code base.
> 
> There is a subtle change in logic here:  Before this change, the experiment
> would only be enabled in official builds when the user has enabled metrics
> reporting.  After this change, it will be enabled in all builds (not just
> official) when the user has enabled metrics recording (not necessarily
> recording+reporting).  I think this is probably the right thing to do (it
looks
> like your initial version of the code enabling the experiment would enable it
in
> both official and non-official builds if metrics were enabled) but I would
like
> you to verify.

LGTM

Powered by Google App Engine
This is Rietveld 408576698