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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 // Records the current operating environment, including metrics provided by | 90 // Records the current operating environment, including metrics provided by |
91 // the specified set of |metrics_providers|. Takes the list of installed | 91 // the specified set of |metrics_providers|. Takes the list of installed |
92 // plugins, Google Update statistics, and synthetic trial IDs as parameters | 92 // plugins, Google Update statistics, and synthetic trial IDs as parameters |
93 // because those can't be obtained synchronously from the UI thread. | 93 // because those can't be obtained synchronously from the UI thread. |
94 // A synthetic trial is one that is set up dynamically by code in Chrome. For | 94 // A synthetic trial is one that is set up dynamically by code in Chrome. For |
95 // example, a pref may be mapped to a synthetic trial such that the group | 95 // example, a pref may be mapped to a synthetic trial such that the group |
96 // is determined by the pref value. | 96 // is determined by the pref value. |
97 void RecordEnvironment( | 97 void RecordEnvironment( |
98 const std::vector<metrics::MetricsProvider*>& metrics_providers, | 98 const std::vector<metrics::MetricsProvider*>& metrics_providers, |
99 const std::vector<variations::ActiveGroupId>& synthetic_trials); | 99 const std::vector<variations::ActiveGroupId>& synthetic_trials, |
| 100 int64 install_date); |
100 | 101 |
101 // Loads the environment proto that was saved by the last RecordEnvironment() | 102 // Loads the environment proto that was saved by the last RecordEnvironment() |
102 // call from prefs and clears the pref value. Returns true on success or false | 103 // call from prefs and clears the pref value. Returns true on success or false |
103 // if there was no saved environment in prefs or it could not be decoded. | 104 // if there was no saved environment in prefs or it could not be decoded. |
104 bool LoadSavedEnvironmentFromPrefs(); | 105 bool LoadSavedEnvironmentFromPrefs(); |
105 | 106 |
106 // Writes application stability metrics, including stability metrics provided | 107 // Writes application stability metrics, including stability metrics provided |
107 // by the specified set of |metrics_providers|. The system profile portion of | 108 // by the specified set of |metrics_providers|. The system profile portion of |
108 // the log must have already been filled in by a call to RecordEnvironment() | 109 // the log must have already been filled in by a call to RecordEnvironment() |
109 // or LoadSavedEnvironmentFromPrefs(). | 110 // or LoadSavedEnvironmentFromPrefs(). |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 190 |
190 // The time when the current log was created. | 191 // The time when the current log was created. |
191 const base::TimeTicks creation_time_; | 192 const base::TimeTicks creation_time_; |
192 | 193 |
193 PrefService* local_state_; | 194 PrefService* local_state_; |
194 | 195 |
195 DISALLOW_COPY_AND_ASSIGN(MetricsLog); | 196 DISALLOW_COPY_AND_ASSIGN(MetricsLog); |
196 }; | 197 }; |
197 | 198 |
198 #endif // COMPONENTS_METRICS_METRICS_LOG_H_ | 199 #endif // COMPONENTS_METRICS_METRICS_LOG_H_ |
OLD | NEW |