OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 #include <map> | 79 #include <map> |
80 #include <string> | 80 #include <string> |
81 #include <vector> | 81 #include <vector> |
82 | 82 |
83 #include "base/base_export.h" | 83 #include "base/base_export.h" |
84 #include "base/gtest_prod_util.h" | 84 #include "base/gtest_prod_util.h" |
85 #include "base/memory/ref_counted.h" | 85 #include "base/memory/ref_counted.h" |
86 #include "base/observer_list_threadsafe.h" | 86 #include "base/observer_list_threadsafe.h" |
87 #include "base/synchronization/lock.h" | 87 #include "base/synchronization/lock.h" |
88 #include "base/time.h" | 88 #include "base/time/time.h" |
89 | 89 |
90 namespace base { | 90 namespace base { |
91 | 91 |
92 class FieldTrialList; | 92 class FieldTrialList; |
93 | 93 |
94 class BASE_EXPORT FieldTrial : public RefCounted<FieldTrial> { | 94 class BASE_EXPORT FieldTrial : public RefCounted<FieldTrial> { |
95 public: | 95 public: |
96 typedef int Probability; // Probability type for being selected in a trial. | 96 typedef int Probability; // Probability type for being selected in a trial. |
97 | 97 |
98 // EntropyProvider is an interface for providing entropy for one-time | 98 // EntropyProvider is an interface for providing entropy for one-time |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 | 453 |
454 // List of observers to be notified when a group is selected for a FieldTrial. | 454 // List of observers to be notified when a group is selected for a FieldTrial. |
455 scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; | 455 scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; |
456 | 456 |
457 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); | 457 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); |
458 }; | 458 }; |
459 | 459 |
460 } // namespace base | 460 } // namespace base |
461 | 461 |
462 #endif // BASE_METRICS_FIELD_TRIAL_H_ | 462 #endif // BASE_METRICS_FIELD_TRIAL_H_ |
OLD | NEW |