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

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

Issue 308433004: Reduce plugin_metrics_provider_ usage in MetricsService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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_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; 13 class MetricsService;
14 class PrefService; 14 class PrefService;
15 15
16 namespace base {
17 class FilePath;
18 }
19
16 namespace metrics { 20 namespace metrics {
17 class MetricsStateManager; 21 class MetricsStateManager;
18 } 22 }
19 23
20 namespace rappor { 24 namespace rappor {
21 class RapporService; 25 class RapporService;
22 } 26 }
23 27
24 namespace chrome_variations { 28 namespace chrome_variations {
25 class VariationsService; 29 class VariationsService;
(...skipping 10 matching lines...) Expand all
36 40
37 // Returns the MetricsService, creating it if it hasn't been created yet. 41 // Returns the MetricsService, creating it if it hasn't been created yet.
38 MetricsService* GetMetricsService(); 42 MetricsService* GetMetricsService();
39 43
40 // Returns the GetRapporService, creating it if it hasn't been created yet. 44 // Returns the GetRapporService, creating it if it hasn't been created yet.
41 rappor::RapporService* GetRapporService(); 45 rappor::RapporService* GetRapporService();
42 46
43 // Returns the VariationsService, creating it if it hasn't been created yet. 47 // Returns the VariationsService, creating it if it hasn't been created yet.
44 chrome_variations::VariationsService* GetVariationsService(); 48 chrome_variations::VariationsService* GetVariationsService();
45 49
50 // Should be called when a plugin loading error occurs.
51 void OnPluginLoadingError(const base::FilePath& plugin_path);
52
46 private: 53 private:
47 metrics::MetricsStateManager* GetMetricsStateManager(); 54 metrics::MetricsStateManager* GetMetricsStateManager();
48 55
49 // Returns true iff metrics reporting is enabled. 56 // Returns true iff metrics reporting is enabled.
50 bool IsMetricsReportingEnabled() const; 57 bool IsMetricsReportingEnabled() const;
51 58
52 // Ensures that all functions are called from the same thread. 59 // Ensures that all functions are called from the same thread.
53 base::ThreadChecker thread_checker_; 60 base::ThreadChecker thread_checker_;
54 61
55 // Weak pointer to the local state prefs store. 62 // Weak pointer to the local state prefs store.
56 PrefService* local_state_; 63 PrefService* local_state_;
57 64
58 // MetricsStateManager which is passed as a parameter to service constructors. 65 // MetricsStateManager which is passed as a parameter to service constructors.
59 scoped_ptr<metrics::MetricsStateManager> metrics_state_manager_; 66 scoped_ptr<metrics::MetricsStateManager> metrics_state_manager_;
60 67
61 // Chrome embedder implementation of the MetricsServiceClient. Owns the 68 // Chrome embedder implementation of the MetricsServiceClient. Owns the
62 // MetricsService. 69 // MetricsService.
63 scoped_ptr<ChromeMetricsServiceClient> metrics_service_client_; 70 scoped_ptr<ChromeMetricsServiceClient> metrics_service_client_;
64 71
65 // The RapporService, for RAPPOR metric uploads. 72 // The RapporService, for RAPPOR metric uploads.
66 scoped_ptr<rappor::RapporService> rappor_service_; 73 scoped_ptr<rappor::RapporService> rappor_service_;
67 74
68 // The VariationsService, for server-side experiments infrastructure. 75 // The VariationsService, for server-side experiments infrastructure.
69 scoped_ptr<chrome_variations::VariationsService> variations_service_; 76 scoped_ptr<chrome_variations::VariationsService> variations_service_;
70 77
71 DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager); 78 DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager);
72 }; 79 };
73 80
74 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_ 81 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/metrics/metrics_services_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698