OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_VARIATIONS_SYNTHETIC_TRIALS_H_ |
| 6 #define COMPONENTS_VARIATIONS_SYNTHETIC_TRIALS_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/compiler_specific.h" |
| 11 #include "base/time/time.h" |
| 12 #include "components/variations/active_field_trials.h" |
| 13 |
| 14 namespace variations { |
| 15 |
| 16 // A Field Trial and its selected group, which represent a particular |
| 17 // Chrome configuration state. For example, the trial name could map to |
| 18 // a preference name, and the group name could map to a preference value. |
| 19 struct SyntheticTrialGroup { |
| 20 public: |
| 21 SyntheticTrialGroup(uint32_t trial, uint32_t group); |
| 22 ~SyntheticTrialGroup(); |
| 23 |
| 24 ActiveGroupId id; |
| 25 base::TimeTicks start_time; |
| 26 }; |
| 27 |
| 28 // Interface class to observe changes to synthetic trials in MetricsService. |
| 29 class SyntheticTrialObserver { |
| 30 public: |
| 31 // Called when the list of synthetic field trial groups has changed. |
| 32 virtual void OnSyntheticTrialsChanged( |
| 33 const std::vector<SyntheticTrialGroup>& groups) = 0; |
| 34 |
| 35 protected: |
| 36 virtual ~SyntheticTrialObserver() {} |
| 37 }; |
| 38 |
| 39 } // namespace variations |
| 40 |
| 41 #endif // COMPONENTS_VARIATIONS_SYNTHETIC_TRIALS_H_ |
OLD | NEW |