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

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

Issue 2009773007: Add AntiVirus information to the system profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hash the product name and version Created 4 years, 6 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
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_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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 15 matching lines...) Expand all
26 class GoogleUpdateMetricsProviderWin; 26 class GoogleUpdateMetricsProviderWin;
27 class PluginMetricsProvider; 27 class PluginMetricsProvider;
28 class PrefRegistrySimple; 28 class PrefRegistrySimple;
29 class PrefService; 29 class PrefService;
30 30
31 #if !defined(OS_CHROMEOS) 31 #if !defined(OS_CHROMEOS)
32 class SigninStatusMetricsProvider; 32 class SigninStatusMetricsProvider;
33 #endif 33 #endif
34 34
35 namespace metrics { 35 namespace metrics {
36 class AntiVirusMetricsProvider;
36 class DriveMetricsProvider; 37 class DriveMetricsProvider;
37 class MetricsService; 38 class MetricsService;
38 class MetricsStateManager; 39 class MetricsStateManager;
39 class ProfilerMetricsProvider; 40 class ProfilerMetricsProvider;
40 } // namespace metrics 41 } // namespace metrics
41 42
42 // ChromeMetricsServiceClient provides an implementation of MetricsServiceClient 43 // ChromeMetricsServiceClient provides an implementation of MetricsServiceClient
43 // that depends on chrome/. 44 // that depends on chrome/.
44 class ChromeMetricsServiceClient 45 class ChromeMetricsServiceClient
45 : public metrics::MetricsServiceClient, 46 : public metrics::MetricsServiceClient,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 void OnInitTaskGotHardwareClass(); 97 void OnInitTaskGotHardwareClass();
97 98
98 // Callback that continues the init task by loading plugin information. 99 // Callback that continues the init task by loading plugin information.
99 void OnInitTaskGotBluetoothAdapter(); 100 void OnInitTaskGotBluetoothAdapter();
100 101
101 // Called after the Plugin init task has been completed that continues the 102 // Called after the Plugin init task has been completed that continues the
102 // init task by launching a task to gather Google Update statistics. 103 // init task by launching a task to gather Google Update statistics.
103 void OnInitTaskGotPluginInfo(); 104 void OnInitTaskGotPluginInfo();
104 105
105 // Called after GoogleUpdate init task has been completed that continues the 106 // Called after GoogleUpdate init task has been completed that continues the
107 // init task by loading AntiVirus metrics.
108 void OnInitTaskGotGoogleUpdateData();
109
110 // Called after AntiVirus init task has been completed that continues the
106 // init task by loading drive metrics. 111 // init task by loading drive metrics.
107 void OnInitTaskGotGoogleUpdateData(); 112 void OnInitTaskGotAntiVirusData();
108 113
109 // Called after the drive metrics init task has been completed that continues 114 // Called after the drive metrics init task has been completed that continues
110 // the init task by loading profiler data. 115 // the init task by loading profiler data.
111 void OnInitTaskGotDriveMetrics(); 116 void OnInitTaskGotDriveMetrics();
112 117
113 // Returns true iff profiler data should be included in the next metrics log. 118 // Returns true iff profiler data should be included in the next metrics log.
114 // NOTE: This method is probabilistic and also updates internal state as a 119 // NOTE: This method is probabilistic and also updates internal state as a
115 // side-effect when called, so it should only be called once per log. 120 // side-effect when called, so it should only be called once per log.
116 bool ShouldIncludeProfilerDataInLog(); 121 bool ShouldIncludeProfilerDataInLog();
117 122
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 #if defined(ENABLE_PLUGINS) 188 #if defined(ENABLE_PLUGINS)
184 // The PluginMetricsProvider instance that was registered with 189 // The PluginMetricsProvider instance that was registered with
185 // MetricsService. Has the same lifetime as |metrics_service_|. 190 // MetricsService. Has the same lifetime as |metrics_service_|.
186 PluginMetricsProvider* plugin_metrics_provider_; 191 PluginMetricsProvider* plugin_metrics_provider_;
187 #endif 192 #endif
188 193
189 #if defined(OS_WIN) 194 #if defined(OS_WIN)
190 // The GoogleUpdateMetricsProviderWin instance that was registered with 195 // The GoogleUpdateMetricsProviderWin instance that was registered with
191 // MetricsService. Has the same lifetime as |metrics_service_|. 196 // MetricsService. Has the same lifetime as |metrics_service_|.
192 GoogleUpdateMetricsProviderWin* google_update_metrics_provider_; 197 GoogleUpdateMetricsProviderWin* google_update_metrics_provider_;
198
199 // The AntiVirusMetricsProvider instance that was registered with
200 // MetricsService. Has the same lifetime as |metrics_service_|.
201 metrics::AntiVirusMetricsProvider* antivirus_metrics_provider_;
193 #endif 202 #endif
194 203
195 // The DriveMetricsProvider instance that was registered with MetricsService. 204 // The DriveMetricsProvider instance that was registered with MetricsService.
196 // Has the same lifetime as |metrics_service_|. 205 // Has the same lifetime as |metrics_service_|.
197 metrics::DriveMetricsProvider* drive_metrics_provider_; 206 metrics::DriveMetricsProvider* drive_metrics_provider_;
198 207
199 // Callback that is called when initial metrics gathering is complete. 208 // Callback that is called when initial metrics gathering is complete.
200 base::Closure finished_init_task_callback_; 209 base::Closure finished_init_task_callback_;
201 210
202 // The MemoryGrowthTracker instance that tracks memory usage growth in 211 // The MemoryGrowthTracker instance that tracks memory usage growth in
(...skipping 15 matching lines...) Expand all
218 // Whether this client has already uploaded profiler data during this session. 227 // Whether this client has already uploaded profiler data during this session.
219 // Profiler data is uploaded at most once per session. 228 // Profiler data is uploaded at most once per session.
220 bool has_uploaded_profiler_data_; 229 bool has_uploaded_profiler_data_;
221 230
222 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; 231 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_;
223 232
224 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); 233 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient);
225 }; 234 };
226 235
227 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 236 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698