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 set of user experience metrics data recorded by | 5 // This file defines a set of user experience metrics data recorded by |
6 // the MetricsService. This is the unit of data that is sent to the server. | 6 // the MetricsService. This is the unit of data that is sent to the server. |
7 | 7 |
8 #ifndef COMPONENTS_METRICS_METRICS_LOG_H_ | 8 #ifndef COMPONENTS_METRICS_METRICS_LOG_H_ |
9 #define COMPONENTS_METRICS_METRICS_LOG_H_ | 9 #define COMPONENTS_METRICS_METRICS_LOG_H_ |
10 | 10 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 return creation_time_; | 134 return creation_time_; |
135 } | 135 } |
136 | 136 |
137 int num_events() const { | 137 int num_events() const { |
138 return uma_proto_.omnibox_event_size() + | 138 return uma_proto_.omnibox_event_size() + |
139 uma_proto_.user_action_event_size(); | 139 uma_proto_.user_action_event_size(); |
140 } | 140 } |
141 | 141 |
142 LogType log_type() const { return log_type_; } | 142 LogType log_type() const { return log_type_; } |
143 | 143 |
144 ChromeUserMetricsExtension* uma_proto() { return &uma_proto_; } | |
Alexei Svitkine (slow)
2014/12/10 22:36:37
Revert this change, since it isn't needed per my o
ramant (doing other things)
2014/12/11 02:21:53
Done.
| |
145 | |
144 protected: | 146 protected: |
145 // Exposed for the sake of mocking/accessing in test code. | 147 // Exposed for the sake of mocking/accessing in test code. |
146 | 148 |
147 // Fills |field_trial_ids| with the list of initialized field trials name and | 149 // Fills |field_trial_ids| with the list of initialized field trials name and |
148 // group ids. | 150 // group ids. |
149 virtual void GetFieldTrialIds( | 151 virtual void GetFieldTrialIds( |
150 std::vector<variations::ActiveGroupId>* field_trial_ids) const; | 152 std::vector<variations::ActiveGroupId>* field_trial_ids) const; |
151 | 153 |
152 ChromeUserMetricsExtension* uma_proto() { return &uma_proto_; } | |
153 const ChromeUserMetricsExtension* uma_proto() const { | 154 const ChromeUserMetricsExtension* uma_proto() const { |
154 return &uma_proto_; | 155 return &uma_proto_; |
155 } | 156 } |
156 | 157 |
157 private: | 158 private: |
158 // Returns true if the environment has already been filled in by a call to | 159 // Returns true if the environment has already been filled in by a call to |
159 // RecordEnvironment() or LoadSavedEnvironmentFromPrefs(). | 160 // RecordEnvironment() or LoadSavedEnvironmentFromPrefs(). |
160 bool HasEnvironment() const; | 161 bool HasEnvironment() const; |
161 | 162 |
162 // Returns true if the stability metrics have already been filled in by a | 163 // Returns true if the stability metrics have already been filled in by a |
(...skipping 29 matching lines...) Expand all Loading... | |
192 const base::TimeTicks creation_time_; | 193 const base::TimeTicks creation_time_; |
193 | 194 |
194 PrefService* local_state_; | 195 PrefService* local_state_; |
195 | 196 |
196 DISALLOW_COPY_AND_ASSIGN(MetricsLog); | 197 DISALLOW_COPY_AND_ASSIGN(MetricsLog); |
197 }; | 198 }; |
198 | 199 |
199 } // namespace metrics | 200 } // namespace metrics |
200 | 201 |
201 #endif // COMPONENTS_METRICS_METRICS_LOG_H_ | 202 #endif // COMPONENTS_METRICS_METRICS_LOG_H_ |
OLD | NEW |