Enable Enterprise enrollment on desktop builds.
[chromium-blink-merge.git] / chrome / browser / metrics / metrics_log_chromeos.h
blob239bce6030a223d151bd2f1777cbb6d824f92d01
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.
5 #ifndef CHROME_BROWSER_METRICS_METRICS_LOG_CHROMEOS_H_
6 #define CHROME_BROWSER_METRICS_METRICS_LOG_CHROMEOS_H_
8 #include "chrome/browser/metrics/perf_provider_chromeos.h"
10 namespace device {
11 class BluetoothAdapter;
14 namespace metrics {
15 class ChromeUserMetricsExtension;
18 class PrefService;
20 // Performs ChromeOS specific metrics logging.
21 class MetricsLogChromeOS {
22 public:
23 explicit MetricsLogChromeOS(metrics::ChromeUserMetricsExtension* uma_proto);
24 virtual ~MetricsLogChromeOS();
26 // Logs ChromeOS specific metrics which don't need to be updated immediately.
27 void LogChromeOSMetrics();
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);
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();
41 // Sets the Bluetooth Adapter instance used for the WriteBluetoothProto()
42 // call.
43 void SetBluetoothAdapter(scoped_refptr<device::BluetoothAdapter> adapter);
45 // Writes info about paired Bluetooth devices on this system.
46 virtual void WriteBluetoothProto();
48 metrics::PerfProvider perf_provider_;
50 // Bluetooth Adapter instance for collecting information about paired devices.
51 scoped_refptr<device::BluetoothAdapter> adapter_;
52 metrics::ChromeUserMetricsExtension* uma_proto_;
54 DISALLOW_COPY_AND_ASSIGN(MetricsLogChromeOS);
57 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_CHROMEOS_H_