OLD | NEW |
| (Empty) |
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 | |
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(PrefService* pref); | |
34 | |
35 private: | |
36 // Update the number of users logged into a multi-profile session. | |
37 // If the number of users change while the log is open, the call invalidates | |
38 // the user count value. | |
39 void UpdateMultiProfileUserCount(); | |
40 | |
41 // Sets the Bluetooth Adapter instance used for the WriteBluetoothProto() | |
42 // call. | |
43 void SetBluetoothAdapter(scoped_refptr<device::BluetoothAdapter> adapter); | |
44 | |
45 // Writes info about paired Bluetooth devices on this system. | |
46 virtual void WriteBluetoothProto(); | |
47 | |
48 metrics::PerfProvider perf_provider_; | |
49 | |
50 // Bluetooth Adapter instance for collecting information about paired devices. | |
51 scoped_refptr<device::BluetoothAdapter> adapter_; | |
52 metrics::ChromeUserMetricsExtension* uma_proto_; | |
53 | |
54 DISALLOW_COPY_AND_ASSIGN(MetricsLogChromeOS); | |
55 }; | |
56 | |
57 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_CHROMEOS_H_ | |
OLD | NEW |