OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file defines a service that collects information about the user | 5 // This file defines a service that collects information about the user |
6 // experience in order to help improve future versions of the app. | 6 // experience in order to help improve future versions of the app. |
7 | 7 |
8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_ | 8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_ |
9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_ | 9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_ |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Chrome configuration state. For example, the trial name could map to | 60 // Chrome configuration state. For example, the trial name could map to |
61 // a preference name, and the group name could map to a preference value. | 61 // a preference name, and the group name could map to a preference value. |
62 struct SyntheticTrialGroup { | 62 struct SyntheticTrialGroup { |
63 public: | 63 public: |
64 ~SyntheticTrialGroup(); | 64 ~SyntheticTrialGroup(); |
65 | 65 |
66 variations::ActiveGroupId id; | 66 variations::ActiveGroupId id; |
67 base::TimeTicks start_time; | 67 base::TimeTicks start_time; |
68 | 68 |
69 private: | 69 private: |
| 70 // Synthetic field trial users: |
| 71 friend class MetricsServiceAccessor; |
70 friend class MetricsService; | 72 friend class MetricsService; |
71 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); | 73 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); |
72 | 74 |
73 // This constructor is private specifically so as to control which code is | 75 // This constructor is private specifically so as to control which code is |
74 // able to access it. New code that wishes to use it should be added as a | 76 // able to access it. New code that wishes to use it should be added as a |
75 // friend class. | 77 // friend class. |
76 SyntheticTrialGroup(uint32 trial, uint32 group); | 78 SyntheticTrialGroup(uint32 trial, uint32 group); |
77 }; | 79 }; |
78 | 80 |
79 class MetricsService : public base::HistogramFlattener { | 81 class MetricsService : public base::HistogramFlattener { |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess); | 464 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess); |
463 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver); | 465 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver); |
464 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, | 466 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, |
465 PermutedEntropyCacheClearedWhenLowEntropyReset); | 467 PermutedEntropyCacheClearedWhenLowEntropyReset); |
466 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); | 468 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); |
467 | 469 |
468 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 470 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
469 }; | 471 }; |
470 | 472 |
471 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ | 473 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ |
OLD | NEW |