Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_METRICS_METRICS_LOG_CHROMEOS_H_ | |
| 6 #define CHROME_BROWSER_METRICS_METRICS_LOG_CHROMEOS_H_ | |
| 7 | |
| 8 #include "chrome/browser/metrics/perf_provider_chromeos.h" | |
| 9 | |
| 10 namespace device { | |
| 11 class BluetoothAdapter; | |
| 12 } | |
| 13 | |
| 14 namespace metrics { | |
| 15 class ChromeUserMetricsExtension; | |
| 16 } | |
| 17 | |
| 18 class PrefService; | |
| 19 | |
| 20 // Performs ChromeOS specific metrics logging. | |
| 21 class MetricsLogChromeOS { | |
| 22 public: | |
| 23 explicit MetricsLogChromeOS(metrics::ChromeUserMetricsExtension* uma_proto); | |
| 24 virtual ~MetricsLogChromeOS(); | |
| 25 | |
| 26 // Logs ChromeOS specific metrics which don't need to be updated immediately. | |
| 27 void LogChromeOSMetrics(); | |
| 28 | |
| 29 // Within the stability group, write ChromeOS specific attributes that need to | |
| 30 // be updated asap and can't be delayed until the user decides to restart | |
| 31 // chromium. Delaying these stats would bias metrics away from happy long | |
| 32 // lived chromium processes (ones that don't crash, and keep on running). | |
| 33 void WriteRealtimeStabilityAttributes( | |
|
ramant (doing other things)
2014/02/03 17:45:27
nit: line#33 and 34 could be combined into one lin
tdresser
2014/02/03 17:55:34
Done.
| |
| 34 PrefService* pref); | |
| 35 | |
| 36 private: | |
| 37 // Update the number of users logged into a multi-profile session. | |
| 38 // If the number of users change while the log is open, the call invalidates | |
| 39 // the user count value. | |
| 40 void UpdateMultiProfileUserCount(); | |
| 41 | |
| 42 // Sets the Bluetooth Adapter instance used for the WriteBluetoothProto() | |
| 43 // call. | |
| 44 void SetBluetoothAdapter(scoped_refptr<device::BluetoothAdapter> adapter); | |
| 45 | |
| 46 // Writes info about paired Bluetooth devices on this system. | |
| 47 virtual void WriteBluetoothProto(); | |
| 48 | |
| 49 metrics::PerfProvider perf_provider_; | |
| 50 | |
| 51 // Bluetooth Adapter instance for collecting information about paired devices. | |
| 52 scoped_refptr<device::BluetoothAdapter> adapter_; | |
| 53 metrics::ChromeUserMetricsExtension* uma_proto_; | |
| 54 | |
| 55 DISALLOW_COPY_AND_ASSIGN(MetricsLogChromeOS); | |
| 56 }; | |
| 57 | |
| 58 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_CHROMEOS_H_ | |
| OLD | NEW |