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 #ifndef CHROME_BROWSER_METRICS_FIELD_TRIAL_SYNCHRONIZER_H_ | 5 #ifndef CHROME_BROWSER_METRICS_FIELD_TRIAL_SYNCHRONIZER_H_ |
6 #define CHROME_BROWSER_METRICS_FIELD_TRIAL_SYNCHRONIZER_H_ | 6 #define CHROME_BROWSER_METRICS_FIELD_TRIAL_SYNCHRONIZER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 // the given field trail (|field_trial_name|). This is called on UI thread. | 38 // the given field trail (|field_trial_name|). This is called on UI thread. |
39 void NotifyAllRenderers(const std::string& field_trial_name, | 39 void NotifyAllRenderers(const std::string& field_trial_name, |
40 const std::string& group_name); | 40 const std::string& group_name); |
41 | 41 |
42 // FieldTrialList::Observer methods: | 42 // FieldTrialList::Observer methods: |
43 | 43 |
44 // This method is called by the FieldTrialList singleton when a trial's group | 44 // This method is called by the FieldTrialList singleton when a trial's group |
45 // is finalized. This method contacts all renderers (by calling | 45 // is finalized. This method contacts all renderers (by calling |
46 // NotifyAllRenderers) to create a FieldTrial that carries the randomly | 46 // NotifyAllRenderers) to create a FieldTrial that carries the randomly |
47 // selected state from the browser process into all the renderer processes. | 47 // selected state from the browser process into all the renderer processes. |
48 virtual void OnFieldTrialGroupFinalized( | 48 void OnFieldTrialGroupFinalized(const std::string& name, |
49 const std::string& name, | 49 const std::string& group_name) override; |
50 const std::string& group_name) override; | |
51 | 50 |
52 private: | 51 private: |
53 friend class base::RefCountedThreadSafe<FieldTrialSynchronizer>; | 52 friend class base::RefCountedThreadSafe<FieldTrialSynchronizer>; |
54 virtual ~FieldTrialSynchronizer(); | 53 ~FieldTrialSynchronizer() override; |
55 | 54 |
56 DISALLOW_COPY_AND_ASSIGN(FieldTrialSynchronizer); | 55 DISALLOW_COPY_AND_ASSIGN(FieldTrialSynchronizer); |
57 }; | 56 }; |
58 | 57 |
59 #endif // CHROME_BROWSER_METRICS_FIELD_TRIAL_SYNCHRONIZER_H_ | 58 #endif // CHROME_BROWSER_METRICS_FIELD_TRIAL_SYNCHRONIZER_H_ |
OLD | NEW |