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

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

Issue 577823002: Moves ProfilerMetricsProvider to //components/metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaase Created 6 years, 3 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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "chrome/browser/memory_details.h" 15 #include "chrome/browser/memory_details.h"
16 #include "chrome/browser/metrics/network_stats_uploader.h" 16 #include "chrome/browser/metrics/network_stats_uploader.h"
17 #include "chrome/browser/metrics/tracking_synchronizer_observer.h"
18 #include "components/metrics/metrics_service_client.h" 17 #include "components/metrics/metrics_service_client.h"
18 #include "components/metrics/profiler/tracking_synchronizer_observer.h"
19 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
20 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
21 21
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 ProfilerMetricsProvider;
27 26
28 #if !defined(OS_CHROMEOS) && !defined(OS_IOS) 27 #if !defined(OS_CHROMEOS) && !defined(OS_IOS)
29 class SigninStatusMetricsProvider; 28 class SigninStatusMetricsProvider;
30 #endif 29 #endif
31 30
32 namespace base { 31 namespace base {
33 class FilePath; 32 class FilePath;
34 } 33 }
35 34
36 namespace metrics { 35 namespace metrics {
37 class MetricsService; 36 class MetricsService;
38 class MetricsStateManager; 37 class MetricsStateManager;
38 class ProfilerMetricsProvider;
39 } 39 }
40 40
41 // ChromeMetricsServiceClient provides an implementation of MetricsServiceClient 41 // ChromeMetricsServiceClient provides an implementation of MetricsServiceClient
42 // that depends on chrome/. 42 // that depends on chrome/.
43 class ChromeMetricsServiceClient 43 class ChromeMetricsServiceClient
44 : public metrics::MetricsServiceClient, 44 : public metrics::MetricsServiceClient,
45 public chrome_browser_metrics::TrackingSynchronizerObserver, 45 public metrics::TrackingSynchronizerObserver,
46 public content::NotificationObserver { 46 public content::NotificationObserver {
47 public: 47 public:
48 virtual ~ChromeMetricsServiceClient(); 48 virtual ~ChromeMetricsServiceClient();
49 49
50 // Factory function. 50 // Factory function.
51 static scoped_ptr<ChromeMetricsServiceClient> Create( 51 static scoped_ptr<ChromeMetricsServiceClient> Create(
52 metrics::MetricsStateManager* state_manager, 52 metrics::MetricsStateManager* state_manager,
53 PrefService* local_state); 53 PrefService* local_state);
54 54
55 // Registers local state prefs used by this class. 55 // Registers local state prefs used by this class.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 base::Closure collect_final_metrics_done_callback_; 146 base::Closure collect_final_metrics_done_callback_;
147 147
148 // Indicates that collect final metrics step is running. 148 // Indicates that collect final metrics step is running.
149 bool waiting_for_collect_final_metrics_step_; 149 bool waiting_for_collect_final_metrics_step_;
150 150
151 // Number of async histogram fetch requests in progress. 151 // Number of async histogram fetch requests in progress.
152 int num_async_histogram_fetches_in_progress_; 152 int num_async_histogram_fetches_in_progress_;
153 153
154 // The ProfilerMetricsProvider instance that was registered with 154 // The ProfilerMetricsProvider instance that was registered with
155 // MetricsService. Has the same lifetime as |metrics_service_|. 155 // MetricsService. Has the same lifetime as |metrics_service_|.
156 ProfilerMetricsProvider* profiler_metrics_provider_; 156 metrics::ProfilerMetricsProvider* profiler_metrics_provider_;
157 157
158 #if defined(ENABLE_PLUGINS) 158 #if defined(ENABLE_PLUGINS)
159 // The PluginMetricsProvider instance that was registered with 159 // The PluginMetricsProvider instance that was registered with
160 // MetricsService. Has the same lifetime as |metrics_service_|. 160 // MetricsService. Has the same lifetime as |metrics_service_|.
161 PluginMetricsProvider* plugin_metrics_provider_; 161 PluginMetricsProvider* plugin_metrics_provider_;
162 #endif 162 #endif
163 163
164 #if defined(OS_WIN) 164 #if defined(OS_WIN)
165 // The GoogleUpdateMetricsProviderWin instance that was registered with 165 // The GoogleUpdateMetricsProviderWin instance that was registered with
166 // MetricsService. Has the same lifetime as |metrics_service_|. 166 // MetricsService. Has the same lifetime as |metrics_service_|.
(...skipping 12 matching lines...) Expand all
179 // The MemoryGrowthTracker instance that tracks memory usage growth in 179 // The MemoryGrowthTracker instance that tracks memory usage growth in
180 // MemoryDetails. 180 // MemoryDetails.
181 MemoryGrowthTracker memory_growth_tracker_; 181 MemoryGrowthTracker memory_growth_tracker_;
182 182
183 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; 183 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_;
184 184
185 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); 185 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient);
186 }; 186 };
187 187
188 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 188 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/metrics/chrome_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698