| 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 // 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 CHROME_BROWSER_METRICS_METRICS_LOG_H_ | 8 #ifndef CHROME_BROWSER_METRICS_METRICS_LOG_H_ |
| 9 #define CHROME_BROWSER_METRICS_METRICS_LOG_H_ | 9 #define CHROME_BROWSER_METRICS_METRICS_LOG_H_ |
| 10 | 10 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 virtual int GetScreenCount() const; | 134 virtual int GetScreenCount() const; |
| 135 | 135 |
| 136 // Fills |field_trial_ids| with the list of initialized field trials name and | 136 // Fills |field_trial_ids| with the list of initialized field trials name and |
| 137 // group ids. | 137 // group ids. |
| 138 virtual void GetFieldTrialIds( | 138 virtual void GetFieldTrialIds( |
| 139 std::vector<chrome_variations::ActiveGroupId>* field_trial_ids) const; | 139 std::vector<chrome_variations::ActiveGroupId>* field_trial_ids) const; |
| 140 | 140 |
| 141 private: | 141 private: |
| 142 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); | 142 FRIEND_TEST_ALL_PREFIXES(MetricsLogTest, ChromeOSStabilityData); |
| 143 | 143 |
| 144 class NetworkObserver; |
| 145 |
| 144 // Writes application stability metrics (as part of the profile log). | 146 // Writes application stability metrics (as part of the profile log). |
| 145 // NOTE: Has the side-effect of clearing those counts. | 147 // NOTE: Has the side-effect of clearing those counts. |
| 146 void WriteStabilityElement( | 148 void WriteStabilityElement( |
| 147 const std::vector<webkit::WebPluginInfo>& plugin_list, | 149 const std::vector<webkit::WebPluginInfo>& plugin_list, |
| 148 PrefService* pref); | 150 PrefService* pref); |
| 149 | 151 |
| 150 // Within stability group, write plugin crash stats. | 152 // Within stability group, write plugin crash stats. |
| 151 void WritePluginStabilityElements( | 153 void WritePluginStabilityElements( |
| 152 const std::vector<webkit::WebPluginInfo>& plugin_list, | 154 const std::vector<webkit::WebPluginInfo>& plugin_list, |
| 153 PrefService* pref); | 155 PrefService* pref); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 177 | 179 |
| 178 // Writes metrics for the profile identified by key. This writes all | 180 // Writes metrics for the profile identified by key. This writes all |
| 179 // key/value pairs in profile_metrics. | 181 // key/value pairs in profile_metrics. |
| 180 void WriteProfileMetrics(const std::string& key, | 182 void WriteProfileMetrics(const std::string& key, |
| 181 const base::DictionaryValue& profile_metrics); | 183 const base::DictionaryValue& profile_metrics); |
| 182 | 184 |
| 183 // Writes info about the Google Update install that is managing this client. | 185 // Writes info about the Google Update install that is managing this client. |
| 184 // This is a no-op if called on a non-Windows platform. | 186 // This is a no-op if called on a non-Windows platform. |
| 185 void WriteGoogleUpdateProto(const GoogleUpdateMetrics& google_update_metrics); | 187 void WriteGoogleUpdateProto(const GoogleUpdateMetrics& google_update_metrics); |
| 186 | 188 |
| 189 // Registers as observer with net::NetworkChangeNotifier and keeps track of |
| 190 // the network environment. |
| 191 scoped_ptr<NetworkObserver> network_observer_; |
| 192 |
| 187 DISALLOW_COPY_AND_ASSIGN(MetricsLog); | 193 DISALLOW_COPY_AND_ASSIGN(MetricsLog); |
| 188 }; | 194 }; |
| 189 | 195 |
| 190 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ | 196 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ |
| OLD | NEW |