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