| OLD | NEW |
| 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/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/variations/variation_ids.h" |
| 13 #include "components/variations/variations_associated_data.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) |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |