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

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

Issue 533703002: Remove variation_ids.h file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/common/variations/variation_ids.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/variations/uniformity_field_trials.h" 5 #include "chrome/common/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/variations/variation_ids.h"
13 #include "components/variations/variations_associated_data.h" 12 #include "components/variations/variations_associated_data.h"
14 13
15 namespace chrome_variations { 14 namespace chrome_variations {
16 15
17 namespace { 16 namespace {
18 17
18 const int MINIMIUM_ID = 3300000;
19
20 const int UNIFORMITY_1_PERCENT_BASE = MINIMIUM_ID;
21 const int UNIFORMITY_1_PERCENT_LIMIT = UNIFORMITY_1_PERCENT_BASE + 100;
22 const int UNIFORMITY_5_PERCENT_BASE = UNIFORMITY_1_PERCENT_LIMIT;
23 const int UNIFORMITY_5_PERCENT_LIMIT = UNIFORMITY_5_PERCENT_BASE + 20;
24 const int UNIFORMITY_10_PERCENT_BASE = UNIFORMITY_5_PERCENT_LIMIT;
25 const int UNIFORMITY_10_PERCENT_LIMIT = UNIFORMITY_10_PERCENT_BASE + 10;
26 const int UNIFORMITY_20_PERCENT_BASE = UNIFORMITY_10_PERCENT_LIMIT;
27 const int UNIFORMITY_20_PERCENT_LIMIT = UNIFORMITY_20_PERCENT_BASE + 5;
28 const int UNIFORMITY_50_PERCENT_BASE = UNIFORMITY_20_PERCENT_LIMIT;
29 // A uniformity trial used to compare one-time-randomized and
30 // session-randomized FieldTrials.
31 const int UNIFORMITY_SESSION_RANDOMIZED_5_PERCENT_BASE = 3300139;
32
19 // Set up a uniformity field trial. |one_time_randomized| indicates if the 33 // 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| 34 // 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 35 // 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) 36 // the trial name. |num_trial_groups| must be a divisor of 100 (e.g. 5, 20)
23 void SetupSingleUniformityFieldTrial( 37 void SetupSingleUniformityFieldTrial(
24 base::FieldTrial::RandomizationType randomization_type, 38 base::FieldTrial::RandomizationType randomization_type,
25 const std::string& trial_name_string, 39 const std::string& trial_name_string,
26 const variations::VariationID trial_base_id, 40 const variations::VariationID trial_base_id,
27 int num_trial_groups) { 41 int num_trial_groups) {
28 // Probability per group remains constant for all uniformity trials, what 42 // Probability per group remains constant for all uniformity trials, what
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 const std::string kSessionRandomizedTrialName = 139 const std::string kSessionRandomizedTrialName =
126 "UMA-Session-Randomized-Uniformity-Trial-%d-Percent"; 140 "UMA-Session-Randomized-Uniformity-Trial-%d-Percent";
127 SetupSingleUniformityFieldTrial( 141 SetupSingleUniformityFieldTrial(
128 base::FieldTrial::SESSION_RANDOMIZED, kSessionRandomizedTrialName, 142 base::FieldTrial::SESSION_RANDOMIZED, kSessionRandomizedTrialName,
129 UNIFORMITY_SESSION_RANDOMIZED_5_PERCENT_BASE, 20); 143 UNIFORMITY_SESSION_RANDOMIZED_5_PERCENT_BASE, 20);
130 144
131 SetupNewInstallUniformityTrial(install_date); 145 SetupNewInstallUniformityTrial(install_date);
132 } 146 }
133 147
134 } // namespace chrome_variations 148 } // namespace chrome_variations
OLDNEW
« no previous file with comments | « no previous file | chrome/common/variations/variation_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698