Make field trial randomization type a constructor param.
Changes the Field Trial API to require users to pass ONE_TIME_RANDOMIZED
or SESSION_RANDOMIZED at the time the field trial is created.
This removes a source of human errors, where developers would sometimes
previously forget to call UseOneTimeRandomization() in their CLs.
It's a small startup performance win, since one time randomized trials will
no longer call RandDouble() that will be then replaced by a value from the
entropy provider. (This was showing up in profiles when I was measuring
metrics startup perf on mobile.)
BUG=262971
TEST=Existing unit tests.
[email protected], [email protected]
Review URL: https://codereview.chromium.org/20777005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214352 0039d316-1c4b-4281-b951-d872f2087c98
21 files changed