OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // FieldTrial is a class for handling details of statistical experiments | 5 // FieldTrial is a class for handling details of statistical experiments |
6 // performed by actual users in the field (i.e., in a shipped or beta product). | 6 // performed by actual users in the field (i.e., in a shipped or beta product). |
7 // All code is called exclusively on the UI thread currently. | 7 // All code is called exclusively on the UI thread currently. |
8 // | 8 // |
9 // The simplest example is an experiment to see whether one of two options | 9 // The simplest example is an experiment to see whether one of two options |
10 // produces "better" results across our user population. In that scenario, UMA | 10 // produces "better" results across our user population. In that scenario, UMA |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 //------------------------------------------------------------------------------ | 72 //------------------------------------------------------------------------------ |
73 | 73 |
74 #ifndef BASE_METRICS_FIELD_TRIAL_H_ | 74 #ifndef BASE_METRICS_FIELD_TRIAL_H_ |
75 #define BASE_METRICS_FIELD_TRIAL_H_ | 75 #define BASE_METRICS_FIELD_TRIAL_H_ |
76 #pragma once | 76 #pragma once |
77 | 77 |
78 #include <map> | 78 #include <map> |
79 #include <string> | 79 #include <string> |
80 | 80 |
81 #include "base/gtest_prod_util.h" | 81 #include "base/gtest_prod_util.h" |
82 #include "base/ref_counted.h" | 82 #include "base/memory/ref_counted.h" |
83 #include "base/synchronization/lock.h" | 83 #include "base/synchronization/lock.h" |
84 #include "base/time.h" | 84 #include "base/time.h" |
85 | 85 |
86 namespace base { | 86 namespace base { |
87 | 87 |
88 class FieldTrialList; | 88 class FieldTrialList; |
89 | 89 |
90 class FieldTrial : public RefCounted<FieldTrial> { | 90 class FieldTrial : public RefCounted<FieldTrial> { |
91 public: | 91 public: |
92 typedef int Probability; // Probability type for being selected in a trial. | 92 typedef int Probability; // Probability type for being selected in a trial. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 base::Lock lock_; | 287 base::Lock lock_; |
288 RegistrationList registered_; | 288 RegistrationList registered_; |
289 | 289 |
290 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); | 290 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); |
291 }; | 291 }; |
292 | 292 |
293 } // namespace base | 293 } // namespace base |
294 | 294 |
295 #endif // BASE_METRICS_FIELD_TRIAL_H_ | 295 #endif // BASE_METRICS_FIELD_TRIAL_H_ |
296 | 296 |
OLD | NEW |