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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // Sets the Bluetooth Adapter instance used for the WriteBluetoothProto() | 74 // Sets the Bluetooth Adapter instance used for the WriteBluetoothProto() |
74 // call. | 75 // call. |
75 void SetBluetoothAdapter(scoped_refptr<device::BluetoothAdapter> adapter); | 76 void SetBluetoothAdapter(scoped_refptr<device::BluetoothAdapter> adapter); |
76 | 77 |
77 // Writes info about paired Bluetooth devices on this system. | 78 // Writes info about paired Bluetooth devices on this system. |
78 void WriteBluetoothProto(metrics::SystemProfileProto* system_profile_proto); | 79 void WriteBluetoothProto(metrics::SystemProfileProto* system_profile_proto); |
79 | 80 |
80 // Record the device enrollment status. | 81 // Record the device enrollment status. |
81 void RecordEnrollmentStatus(); | 82 void RecordEnrollmentStatus(); |
82 | 83 |
| 84 // For collecting systemwide perf data. |
83 metrics::PerfProvider perf_provider_; | 85 metrics::PerfProvider perf_provider_; |
84 | 86 |
| 87 #if defined(ENABLE_LEAK_DETECTOR) |
| 88 // For runtime memory leak detection |
| 89 metrics::LeakDetectorController leak_detector_controller_; |
| 90 #endif |
| 91 |
85 // Bluetooth Adapter instance for collecting information about paired devices. | 92 // Bluetooth Adapter instance for collecting information about paired devices. |
86 scoped_refptr<device::BluetoothAdapter> adapter_; | 93 scoped_refptr<device::BluetoothAdapter> adapter_; |
87 | 94 |
88 // Whether the user count was registered at the last log initialization. | 95 // Whether the user count was registered at the last log initialization. |
89 bool registered_user_count_at_log_initialization_; | 96 bool registered_user_count_at_log_initialization_; |
90 | 97 |
91 // The user count at the time that a log was last initialized. Contains a | 98 // The user count at the time that a log was last initialized. Contains a |
92 // valid value only if |registered_user_count_at_log_initialization_| is | 99 // valid value only if |registered_user_count_at_log_initialization_| is |
93 // true. | 100 // true. |
94 uint64_t user_count_at_log_initialization_; | 101 uint64_t user_count_at_log_initialization_; |
95 | 102 |
96 // Hardware class (e.g., hardware qualification ID). This class identifies | 103 // Hardware class (e.g., hardware qualification ID). This class identifies |
97 // the configured system components such as CPU, WiFi adapter, etc. | 104 // the configured system components such as CPU, WiFi adapter, etc. |
98 std::string hardware_class_; | 105 std::string hardware_class_; |
99 | 106 |
100 base::WeakPtrFactory<ChromeOSMetricsProvider> weak_ptr_factory_; | 107 base::WeakPtrFactory<ChromeOSMetricsProvider> weak_ptr_factory_; |
101 | 108 |
102 DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProvider); | 109 DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProvider); |
103 }; | 110 }; |
104 | 111 |
105 #endif // CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ | 112 #endif // CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ |
OLD | NEW |