Chromium Code Reviews| 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 12 matching lines...) Expand all Loading... | |
| 23 | 23 |
| 24 struct AutocompleteLog; | 24 struct AutocompleteLog; |
| 25 class MetricsNetworkObserver; | 25 class MetricsNetworkObserver; |
| 26 class PrefService; | 26 class PrefService; |
| 27 class PrefRegistrySimple; | 27 class PrefRegistrySimple; |
| 28 | 28 |
| 29 namespace base { | 29 namespace base { |
| 30 class DictionaryValue; | 30 class DictionaryValue; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace device { | |
| 34 class BluetoothAdapter; | |
| 35 } | |
| 36 | |
| 33 namespace tracked_objects { | 37 namespace tracked_objects { |
| 34 struct ProcessDataSnapshot; | 38 struct ProcessDataSnapshot; |
| 35 } | 39 } |
| 36 | 40 |
| 37 namespace chrome_variations { | 41 namespace chrome_variations { |
| 38 struct ActiveGroupId; | 42 struct ActiveGroupId; |
| 39 } | 43 } |
| 40 | 44 |
| 41 namespace webkit { | 45 namespace webkit { |
| 42 struct WebPluginInfo; | 46 struct WebPluginInfo; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 | 186 |
| 183 // Writes metrics for the profile identified by key. This writes all | 187 // Writes metrics for the profile identified by key. This writes all |
| 184 // key/value pairs in profile_metrics. | 188 // key/value pairs in profile_metrics. |
| 185 void WriteProfileMetrics(const std::string& key, | 189 void WriteProfileMetrics(const std::string& key, |
| 186 const base::DictionaryValue& profile_metrics); | 190 const base::DictionaryValue& profile_metrics); |
| 187 | 191 |
| 188 // Writes info about the Google Update install that is managing this client. | 192 // Writes info about the Google Update install that is managing this client. |
| 189 // This is a no-op if called on a non-Windows platform. | 193 // This is a no-op if called on a non-Windows platform. |
| 190 void WriteGoogleUpdateProto(const GoogleUpdateMetrics& google_update_metrics); | 194 void WriteGoogleUpdateProto(const GoogleUpdateMetrics& google_update_metrics); |
| 191 | 195 |
| 196 // Writes info about paired Bluetooth devices on this system. | |
| 197 // This is a no-op if called on a non-Chrome OS platform. | |
| 198 void WriteBluetoothProto(metrics::SystemProfileProto::Hardware* hardware, | |
| 199 scoped_refptr<device::BluetoothAdapter> adapter); | |
| 200 | |
| 192 // Observes network state to provide values for SystemProfile::Network. | 201 // Observes network state to provide values for SystemProfile::Network. |
| 193 MetricsNetworkObserver network_observer_; | 202 MetricsNetworkObserver network_observer_; |
| 194 | 203 |
| 195 #if defined(OS_CHROMEOS) | 204 #if defined(OS_CHROMEOS) |
| 196 metrics::PerfProvider perf_provider_; | 205 metrics::PerfProvider perf_provider_; |
| 197 #endif | 206 #endif |
| 198 | 207 |
| 208 // Weak pointer factory for generating 'this' pointers that might live longer | |
| 209 // than we do. | |
| 210 // Note: This should remain the last member so it'll be destroyed and | |
| 211 // invalidate its weak pointers before any other members are destroyed. | |
|
Ilya Sherman
2013/04/23 00:09:43
Hmm, why is the destruction order important? Is t
keybuk
2013/04/23 00:41:42
comment copied from other code ;) removed
| |
| 212 base::WeakPtrFactory<MetricsLog> weak_ptr_factory_; | |
| 213 | |
| 199 DISALLOW_COPY_AND_ASSIGN(MetricsLog); | 214 DISALLOW_COPY_AND_ASSIGN(MetricsLog); |
| 200 }; | 215 }; |
| 201 | 216 |
| 202 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ | 217 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ |
| OLD | NEW |