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

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

Issue 293393010: Move initial metrics gathering tasks out of MetricsService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review 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"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // 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.
45 rappor::RapporService* GetRapporService(); 45 rappor::RapporService* GetRapporService();
46 46
47 // 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.
48 chrome_variations::VariationsService* GetVariationsService(); 48 chrome_variations::VariationsService* GetVariationsService();
49 49
50 // Should be called when a plugin loading error occurs. 50 // Should be called when a plugin loading error occurs.
51 void OnPluginLoadingError(const base::FilePath& plugin_path); 51 void OnPluginLoadingError(const base::FilePath& plugin_path);
52 52
53 private: 53 private:
54 ChromeMetricsServiceClient* GetChromeMetricsServiceClient();
Ilya Sherman 2014/06/02 21:52:37 nit: Please add a doc string. Notably, this creat
blundell 2014/06/06 13:06:29 Doc added. There's no behavioral change since the
Ilya Sherman 2014/06/06 19:04:18 There is a potential behavioral change: OnPluginLo
Ilya Sherman 2014/06/06 19:07:21 Oh, actually, nvm -- I understand your point now:
Alexei Svitkine (slow) 2014/06/06 19:07:30 It used to be that it was called through g_browser
55
54 metrics::MetricsStateManager* GetMetricsStateManager(); 56 metrics::MetricsStateManager* GetMetricsStateManager();
55 57
56 // Returns true iff metrics reporting is enabled. 58 // Returns true iff metrics reporting is enabled.
57 bool IsMetricsReportingEnabled() const; 59 bool IsMetricsReportingEnabled() const;
58 60
59 // Ensures that all functions are called from the same thread. 61 // Ensures that all functions are called from the same thread.
60 base::ThreadChecker thread_checker_; 62 base::ThreadChecker thread_checker_;
61 63
62 // Weak pointer to the local state prefs store. 64 // Weak pointer to the local state prefs store.
63 PrefService* local_state_; 65 PrefService* local_state_;
64 66
65 // MetricsStateManager which is passed as a parameter to service constructors. 67 // MetricsStateManager which is passed as a parameter to service constructors.
66 scoped_ptr<metrics::MetricsStateManager> metrics_state_manager_; 68 scoped_ptr<metrics::MetricsStateManager> metrics_state_manager_;
67 69
68 // Chrome embedder implementation of the MetricsServiceClient. Owns the 70 // Chrome embedder implementation of the MetricsServiceClient. Owns the
69 // MetricsService. 71 // MetricsService.
70 scoped_ptr<ChromeMetricsServiceClient> metrics_service_client_; 72 scoped_ptr<ChromeMetricsServiceClient> metrics_service_client_;
71 73
72 // The RapporService, for RAPPOR metric uploads. 74 // The RapporService, for RAPPOR metric uploads.
73 scoped_ptr<rappor::RapporService> rappor_service_; 75 scoped_ptr<rappor::RapporService> rappor_service_;
74 76
75 // The VariationsService, for server-side experiments infrastructure. 77 // The VariationsService, for server-side experiments infrastructure.
76 scoped_ptr<chrome_variations::VariationsService> variations_service_; 78 scoped_ptr<chrome_variations::VariationsService> variations_service_;
77 79
78 DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager); 80 DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager);
79 }; 81 };
80 82
81 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_ 83 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698