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

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

Issue 296703008: Revert 271798 "[Metrics] Make MetricsStateManager take a callbac..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 27 matching lines...) Expand all
38 38
39 // Returns the GetRapporService, creating it if it hasn't been created yet. 39 // Returns the GetRapporService, creating it if it hasn't been created yet.
40 rappor::RapporService* GetRapporService(); 40 rappor::RapporService* GetRapporService();
41 41
42 // Returns the VariationsService, creating it if it hasn't been created yet. 42 // Returns the VariationsService, creating it if it hasn't been created yet.
43 chrome_variations::VariationsService* GetVariationsService(); 43 chrome_variations::VariationsService* GetVariationsService();
44 44
45 private: 45 private:
46 metrics::MetricsStateManager* GetMetricsStateManager(); 46 metrics::MetricsStateManager* GetMetricsStateManager();
47 47
48 // Returns true iff metrics reporting is enabled.
49 bool IsMetricsReportingEnabled() const;
50
51 // Ensures that all functions are called from the same thread. 48 // Ensures that all functions are called from the same thread.
52 base::ThreadChecker thread_checker_; 49 base::ThreadChecker thread_checker_;
53 50
54 // Weak pointer to the local state prefs store. 51 // Weak pointer to the local state prefs store.
55 PrefService* local_state_; 52 PrefService* local_state_;
56 53
57 // MetricsStateManager which is passed as a parameter to service constructors. 54 // MetricsStateManager which is passed as a parameter to service constructors.
58 scoped_ptr<metrics::MetricsStateManager> metrics_state_manager_; 55 scoped_ptr<metrics::MetricsStateManager> metrics_state_manager_;
59 56
60 // The MetricsService, used for UMA report uploads. 57 // The MetricsService, used for UMA report uploads.
61 scoped_ptr<MetricsService> metrics_service_; 58 scoped_ptr<MetricsService> metrics_service_;
62 59
63 // The RapporService, for RAPPOR metric uploads. 60 // The RapporService, for RAPPOR metric uploads.
64 scoped_ptr<rappor::RapporService> rappor_service_; 61 scoped_ptr<rappor::RapporService> rappor_service_;
65 62
66 // The VariationsService, for server-side experiments infrastructure. 63 // The VariationsService, for server-side experiments infrastructure.
67 scoped_ptr<chrome_variations::VariationsService> variations_service_; 64 scoped_ptr<chrome_variations::VariationsService> variations_service_;
68 65
69 DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager); 66 DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager);
70 }; 67 };
71 68
72 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_ 69 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698