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 "chrome/browser/metrics/perf_provider_chromeos.h" | 8 #include "chrome/browser/metrics/perf_provider_chromeos.h" |
9 #include "components/metrics/metrics_provider.h" | 9 #include "components/metrics/metrics_provider.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 class ChromeOSMetricsProvider : public metrics::MetricsProvider { | 23 class ChromeOSMetricsProvider : public metrics::MetricsProvider { |
24 public: | 24 public: |
25 ChromeOSMetricsProvider(); | 25 ChromeOSMetricsProvider(); |
26 virtual ~ChromeOSMetricsProvider(); | 26 virtual ~ChromeOSMetricsProvider(); |
27 | 27 |
28 static void RegisterPrefs(PrefRegistrySimple* registry); | 28 static void RegisterPrefs(PrefRegistrySimple* registry); |
29 | 29 |
30 // Records a crash. | 30 // Records a crash. |
31 static void LogCrash(const std::string& crash_type); | 31 static void LogCrash(const std::string& crash_type); |
32 | 32 |
| 33 // Called on the FILE thread to load hardware |
| 34 // class information. When this task is complete, |done_callback| is run on |
| 35 // |target_loop|. |
| 36 void InitTaskGetHardwareClass(base::MessageLoopProxy* target_loop, |
| 37 const base::Closure& callback); |
| 38 |
33 // metrics::MetricsProvider: | 39 // metrics::MetricsProvider: |
34 virtual void OnDidCreateMetricsLog() OVERRIDE; | 40 virtual void OnDidCreateMetricsLog() OVERRIDE; |
35 virtual void ProvideSystemProfileMetrics( | 41 virtual void ProvideSystemProfileMetrics( |
36 metrics::SystemProfileProto* system_profile_proto) OVERRIDE; | 42 metrics::SystemProfileProto* system_profile_proto) OVERRIDE; |
37 virtual void ProvideStabilityMetrics( | 43 virtual void ProvideStabilityMetrics( |
38 metrics::SystemProfileProto* system_profile_proto) OVERRIDE; | 44 metrics::SystemProfileProto* system_profile_proto) OVERRIDE; |
39 | 45 |
40 private: | 46 private: |
41 // Update the number of users logged into a multi-profile session. | 47 // Update the number of users logged into a multi-profile session. |
42 // If the number of users change while the log is open, the call invalidates | 48 // If the number of users change while the log is open, the call invalidates |
(...skipping 15 matching lines...) Expand all Loading... |
58 metrics::ChromeUserMetricsExtension* uma_proto_; | 64 metrics::ChromeUserMetricsExtension* uma_proto_; |
59 | 65 |
60 // Whether the user count was registered at the last log initialization. | 66 // Whether the user count was registered at the last log initialization. |
61 bool registered_user_count_at_log_initialization_; | 67 bool registered_user_count_at_log_initialization_; |
62 | 68 |
63 // The user count at the time that a log was last initialized. Contains a | 69 // The user count at the time that a log was last initialized. Contains a |
64 // valid value only if |registered_user_count_at_log_initialization_| is | 70 // valid value only if |registered_user_count_at_log_initialization_| is |
65 // true. | 71 // true. |
66 uint64 user_count_at_log_initialization_; | 72 uint64 user_count_at_log_initialization_; |
67 | 73 |
| 74 // Chrome OS hardware class (e.g., hardware qualification ID). This |
| 75 // class identifies the configured system components such as CPU, |
| 76 // WiFi adapter, etc. |
| 77 std::string hardware_class_; |
| 78 |
68 DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProvider); | 79 DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProvider); |
69 }; | 80 }; |
70 | 81 |
71 #endif // CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ | 82 #endif // CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ |
OLD | NEW |