| 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 static bool used_without_global_; | 507 static bool used_without_global_; |
| 508 | 508 |
| 509 // Lock for access to registered_. | 509 // Lock for access to registered_. |
| 510 base::Lock lock_; | 510 base::Lock lock_; |
| 511 RegistrationMap registered_; | 511 RegistrationMap registered_; |
| 512 | 512 |
| 513 std::map<std::string, std::string> seen_states_; | 513 std::map<std::string, std::string> seen_states_; |
| 514 | 514 |
| 515 // Entropy provider to be used for one-time randomized field trials. If NULL, | 515 // Entropy provider to be used for one-time randomized field trials. If NULL, |
| 516 // one-time randomization is not supported. | 516 // one-time randomization is not supported. |
| 517 scoped_ptr<const FieldTrial::EntropyProvider> entropy_provider_; | 517 std::unique_ptr<const FieldTrial::EntropyProvider> entropy_provider_; |
| 518 | 518 |
| 519 // List of observers to be notified when a group is selected for a FieldTrial. | 519 // List of observers to be notified when a group is selected for a FieldTrial. |
| 520 scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; | 520 scoped_refptr<ObserverListThreadSafe<Observer> > observer_list_; |
| 521 | 521 |
| 522 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); | 522 DISALLOW_COPY_AND_ASSIGN(FieldTrialList); |
| 523 }; | 523 }; |
| 524 | 524 |
| 525 } // namespace base | 525 } // namespace base |
| 526 | 526 |
| 527 #endif // BASE_METRICS_FIELD_TRIAL_H_ | 527 #endif // BASE_METRICS_FIELD_TRIAL_H_ |
| OLD | NEW |