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_CHROME_METRICS_SERVICE_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class ChromeOSMetricsProvider; | 22 class ChromeOSMetricsProvider; |
23 class GoogleUpdateMetricsProviderWin; | 23 class GoogleUpdateMetricsProviderWin; |
24 class PluginMetricsProvider; | 24 class PluginMetricsProvider; |
25 class PrefRegistrySimple; | 25 class PrefRegistrySimple; |
26 class PrefService; | 26 class PrefService; |
27 | 27 |
28 #if !defined(OS_CHROMEOS) && !defined(OS_IOS) | 28 #if !defined(OS_CHROMEOS) && !defined(OS_IOS) |
29 class SigninStatusMetricsProvider; | 29 class SigninStatusMetricsProvider; |
30 #endif | 30 #endif |
31 | 31 |
32 namespace base { | |
33 class FilePath; | |
34 } // namespace base | |
35 | |
36 namespace metrics { | 32 namespace metrics { |
37 class DriveMetricsProvider; | 33 class DriveMetricsProvider; |
38 class MetricsService; | 34 class MetricsService; |
39 class MetricsStateManager; | 35 class MetricsStateManager; |
40 class ProfilerMetricsProvider; | 36 class ProfilerMetricsProvider; |
41 } // namespace metrics | 37 } // namespace metrics |
42 | 38 |
43 // ChromeMetricsServiceClient provides an implementation of MetricsServiceClient | 39 // ChromeMetricsServiceClient provides an implementation of MetricsServiceClient |
44 // that depends on chrome/. | 40 // that depends on chrome/. |
45 class ChromeMetricsServiceClient | 41 class ChromeMetricsServiceClient |
(...skipping 21 matching lines...) Expand all Loading... |
67 metrics::SystemProfileProto::Channel GetChannel() override; | 63 metrics::SystemProfileProto::Channel GetChannel() override; |
68 std::string GetVersionString() override; | 64 std::string GetVersionString() override; |
69 void OnLogUploadComplete() override; | 65 void OnLogUploadComplete() override; |
70 void InitializeSystemProfileMetrics( | 66 void InitializeSystemProfileMetrics( |
71 const base::Closure& done_callback) override; | 67 const base::Closure& done_callback) override; |
72 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; | 68 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; |
73 scoped_ptr<metrics::MetricsLogUploader> CreateUploader( | 69 scoped_ptr<metrics::MetricsLogUploader> CreateUploader( |
74 const base::Callback<void(int)>& on_upload_complete) override; | 70 const base::Callback<void(int)>& on_upload_complete) override; |
75 base::TimeDelta GetStandardUploadInterval() override; | 71 base::TimeDelta GetStandardUploadInterval() override; |
76 base::string16 GetRegistryBackupKey() override; | 72 base::string16 GetRegistryBackupKey() override; |
| 73 void OnPluginLoadingError(const base::FilePath& plugin_path) override; |
77 | 74 |
78 metrics::MetricsService* metrics_service() { return metrics_service_.get(); } | 75 metrics::MetricsService* metrics_service() { return metrics_service_.get(); } |
79 | 76 |
80 void LogPluginLoadingError(const base::FilePath& plugin_path); | |
81 | |
82 private: | 77 private: |
83 explicit ChromeMetricsServiceClient( | 78 explicit ChromeMetricsServiceClient( |
84 metrics::MetricsStateManager* state_manager); | 79 metrics::MetricsStateManager* state_manager); |
85 | 80 |
86 // Completes the two-phase initialization of ChromeMetricsServiceClient. | 81 // Completes the two-phase initialization of ChromeMetricsServiceClient. |
87 void Initialize(); | 82 void Initialize(); |
88 | 83 |
89 // Callback that continues the init task by loading plugin information. | 84 // Callback that continues the init task by loading plugin information. |
90 void OnInitTaskGotHardwareClass(); | 85 void OnInitTaskGotHardwareClass(); |
91 | 86 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // Whether this client has already uploaded profiler data during this session. | 202 // Whether this client has already uploaded profiler data during this session. |
208 // Profiler data is uploaded at most once per session. | 203 // Profiler data is uploaded at most once per session. |
209 bool has_uploaded_profiler_data_; | 204 bool has_uploaded_profiler_data_; |
210 | 205 |
211 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; | 206 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; |
212 | 207 |
213 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); | 208 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); |
214 }; | 209 }; |
215 | 210 |
216 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | 211 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
OLD | NEW |