Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Side by Side Diff: chrome/browser/metrics/chromeos_metrics_provider.h

Issue 1681263003: metrics: Add leak detector controller in Chrome OS metrics system (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add content/public/browser to GN deps Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/metrics/chromeos_metrics_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/metrics/chromeos_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698