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

Side by Side Diff: chrome/common/metrics/variations/uniformity_field_trials.cc

Issue 286063004: Move active field trial API to variations component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/metrics/variations/variations_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/metrics/variations/uniformity_field_trials.h" 5 #include "chrome/common/metrics/variations/uniformity_field_trials.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "chrome/common/metrics/variations/variation_ids.h" 12 #include "chrome/common/metrics/variations/variation_ids.h"
13 #include "chrome/common/metrics/variations/variations_util.h" 13 #include "components/variations/variations_associated_data.h"
14 14
15 namespace chrome_variations { 15 namespace chrome_variations {
16 16
17 namespace { 17 namespace {
18 18
19 // Set up a uniformity field trial. |one_time_randomized| indicates if the 19 // Set up a uniformity field trial. |one_time_randomized| indicates if the
20 // field trial is one-time randomized or session-randomized. |trial_name_string| 20 // field trial is one-time randomized or session-randomized. |trial_name_string|
21 // must contain a "%d" since the percentage of the group will be inserted in 21 // must contain a "%d" since the percentage of the group will be inserted in
22 // the trial name. |num_trial_groups| must be a divisor of 100 (e.g. 5, 20) 22 // the trial name. |num_trial_groups| must be a divisor of 100 (e.g. 5, 20)
23 void SetupSingleUniformityFieldTrial( 23 void SetupSingleUniformityFieldTrial(
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const std::string kSessionRandomizedTrialName = 124 const std::string kSessionRandomizedTrialName =
125 "UMA-Session-Randomized-Uniformity-Trial-%d-Percent"; 125 "UMA-Session-Randomized-Uniformity-Trial-%d-Percent";
126 SetupSingleUniformityFieldTrial( 126 SetupSingleUniformityFieldTrial(
127 base::FieldTrial::SESSION_RANDOMIZED, kSessionRandomizedTrialName, 127 base::FieldTrial::SESSION_RANDOMIZED, kSessionRandomizedTrialName,
128 UNIFORMITY_SESSION_RANDOMIZED_5_PERCENT_BASE, 20); 128 UNIFORMITY_SESSION_RANDOMIZED_5_PERCENT_BASE, 20);
129 129
130 SetupNewInstallUniformityTrial(install_date); 130 SetupNewInstallUniformityTrial(install_date);
131 } 131 }
132 132
133 } // namespace chrome_variations 133 } // namespace chrome_variations
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/metrics/variations/variations_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698