OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ |
6 #define CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ | 6 #define CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "chrome/browser/metrics/leak_detector_controller.h" |
12 #include "chrome/browser/metrics/perf/perf_provider_chromeos.h" | 13 #include "chrome/browser/metrics/perf/perf_provider_chromeos.h" |
13 #include "components/metrics/metrics_provider.h" | 14 #include "components/metrics/metrics_provider.h" |
14 | 15 |
15 namespace device { | 16 namespace device { |
16 class BluetoothAdapter; | 17 class BluetoothAdapter; |
17 } | 18 } |
18 | 19 |
19 namespace metrics { | 20 namespace metrics { |
20 class ChromeUserMetricsExtension; | 21 class ChromeUserMetricsExtension; |
21 } | 22 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // Sets the Bluetooth Adapter instance used for the WriteBluetoothProto() | 75 // Sets the Bluetooth Adapter instance used for the WriteBluetoothProto() |
75 // call. | 76 // call. |
76 void SetBluetoothAdapter(scoped_refptr<device::BluetoothAdapter> adapter); | 77 void SetBluetoothAdapter(scoped_refptr<device::BluetoothAdapter> adapter); |
77 | 78 |
78 // Writes info about paired Bluetooth devices on this system. | 79 // Writes info about paired Bluetooth devices on this system. |
79 void WriteBluetoothProto(metrics::SystemProfileProto* system_profile_proto); | 80 void WriteBluetoothProto(metrics::SystemProfileProto* system_profile_proto); |
80 | 81 |
81 // Record the device enrollment status. | 82 // Record the device enrollment status. |
82 void RecordEnrollmentStatus(); | 83 void RecordEnrollmentStatus(); |
83 | 84 |
| 85 // For collecting systemwide perf data. |
84 metrics::PerfProvider perf_provider_; | 86 metrics::PerfProvider perf_provider_; |
85 | 87 |
| 88 // Enables runtime memory leak detection and gets notified of leak reports. |
| 89 scoped_ptr<metrics::LeakDetectorController> leak_detector_controller_; |
| 90 |
86 // Bluetooth Adapter instance for collecting information about paired devices. | 91 // Bluetooth Adapter instance for collecting information about paired devices. |
87 scoped_refptr<device::BluetoothAdapter> adapter_; | 92 scoped_refptr<device::BluetoothAdapter> adapter_; |
88 | 93 |
89 // Whether the user count was registered at the last log initialization. | 94 // Whether the user count was registered at the last log initialization. |
90 bool registered_user_count_at_log_initialization_; | 95 bool registered_user_count_at_log_initialization_; |
91 | 96 |
92 // The user count at the time that a log was last initialized. Contains a | 97 // The user count at the time that a log was last initialized. Contains a |
93 // valid value only if |registered_user_count_at_log_initialization_| is | 98 // valid value only if |registered_user_count_at_log_initialization_| is |
94 // true. | 99 // true. |
95 uint64_t user_count_at_log_initialization_; | 100 uint64_t user_count_at_log_initialization_; |
96 | 101 |
97 // Hardware class (e.g., hardware qualification ID). This class identifies | 102 // Hardware class (e.g., hardware qualification ID). This class identifies |
98 // the configured system components such as CPU, WiFi adapter, etc. | 103 // the configured system components such as CPU, WiFi adapter, etc. |
99 std::string hardware_class_; | 104 std::string hardware_class_; |
100 | 105 |
101 base::WeakPtrFactory<ChromeOSMetricsProvider> weak_ptr_factory_; | 106 base::WeakPtrFactory<ChromeOSMetricsProvider> weak_ptr_factory_; |
102 | 107 |
103 DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProvider); | 108 DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProvider); |
104 }; | 109 }; |
105 | 110 |
106 #endif // CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ | 111 #endif // CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ |
OLD | NEW |