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_METRICS_SERVICES_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_ |
6 #define CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_ | 6 #define CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
11 | 11 |
12 class ChromeMetricsServiceClient; | 12 class ChromeMetricsServiceClient; |
13 class MetricsService; | |
14 class PrefService; | 13 class PrefService; |
15 | 14 |
16 namespace base { | 15 namespace base { |
17 class FilePath; | 16 class FilePath; |
18 } | 17 } |
19 | 18 |
20 namespace metrics { | 19 namespace metrics { |
| 20 class MetricsService; |
21 class MetricsStateManager; | 21 class MetricsStateManager; |
22 } | 22 } |
23 | 23 |
24 namespace rappor { | 24 namespace rappor { |
25 class RapporService; | 25 class RapporService; |
26 } | 26 } |
27 | 27 |
28 namespace chrome_variations { | 28 namespace chrome_variations { |
29 class VariationsService; | 29 class VariationsService; |
30 } | 30 } |
31 | 31 |
32 // MetricsServicesManager is a helper class that has ownership over the various | 32 // MetricsServicesManager is a helper class that has ownership over the various |
33 // metrics-related services in Chrome: MetricsService (via its client), | 33 // metrics-related services in Chrome: MetricsService (via its client), |
34 // RapporService and VariationsService. | 34 // RapporService and VariationsService. |
35 class MetricsServicesManager { | 35 class MetricsServicesManager { |
36 public: | 36 public: |
37 // Creates the MetricsServicesManager with the |local_state| prefs service. | 37 // Creates the MetricsServicesManager with the |local_state| prefs service. |
38 explicit MetricsServicesManager(PrefService* local_state); | 38 explicit MetricsServicesManager(PrefService* local_state); |
39 virtual ~MetricsServicesManager(); | 39 virtual ~MetricsServicesManager(); |
40 | 40 |
41 // Returns the MetricsService, creating it if it hasn't been created yet (and | 41 // Returns the MetricsService, creating it if it hasn't been created yet (and |
42 // additionally creating the ChromeMetricsServiceClient in that case). | 42 // additionally creating the ChromeMetricsServiceClient in that case). |
43 MetricsService* GetMetricsService(); | 43 metrics::MetricsService* GetMetricsService(); |
44 | 44 |
45 // Returns the GetRapporService, creating it if it hasn't been created yet. | 45 // Returns the GetRapporService, creating it if it hasn't been created yet. |
46 rappor::RapporService* GetRapporService(); | 46 rappor::RapporService* GetRapporService(); |
47 | 47 |
48 // Returns the VariationsService, creating it if it hasn't been created yet. | 48 // Returns the VariationsService, creating it if it hasn't been created yet. |
49 chrome_variations::VariationsService* GetVariationsService(); | 49 chrome_variations::VariationsService* GetVariationsService(); |
50 | 50 |
51 // Should be called when a plugin loading error occurs. | 51 // Should be called when a plugin loading error occurs. |
52 void OnPluginLoadingError(const base::FilePath& plugin_path); | 52 void OnPluginLoadingError(const base::FilePath& plugin_path); |
53 | 53 |
(...skipping 23 matching lines...) Expand all Loading... |
77 // The RapporService, for RAPPOR metric uploads. | 77 // The RapporService, for RAPPOR metric uploads. |
78 scoped_ptr<rappor::RapporService> rappor_service_; | 78 scoped_ptr<rappor::RapporService> rappor_service_; |
79 | 79 |
80 // The VariationsService, for server-side experiments infrastructure. | 80 // The VariationsService, for server-side experiments infrastructure. |
81 scoped_ptr<chrome_variations::VariationsService> variations_service_; | 81 scoped_ptr<chrome_variations::VariationsService> variations_service_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager); | 83 DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager); |
84 }; | 84 }; |
85 | 85 |
86 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_ | 86 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_ |
OLD | NEW |