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" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // Returns the VariationsService, creating it if it hasn't been created yet. | 49 // Returns the VariationsService, creating it if it hasn't been created yet. |
50 chrome_variations::VariationsService* GetVariationsService(); | 50 chrome_variations::VariationsService* GetVariationsService(); |
51 | 51 |
52 // Should be called when a plugin loading error occurs. | 52 // Should be called when a plugin loading error occurs. |
53 void OnPluginLoadingError(const base::FilePath& plugin_path); | 53 void OnPluginLoadingError(const base::FilePath& plugin_path); |
54 | 54 |
55 // Update the managed services when permissions for recording/uploading | 55 // Update the managed services when permissions for recording/uploading |
56 // metrics change. | 56 // metrics change. |
57 void UpdatePermissions(bool may_record, bool may_upload); | 57 void UpdatePermissions(bool may_record, bool may_upload); |
58 | 58 |
59 // Returns true iff metrics reporting is enabled. | 59 // Update the managed services when permissions for uploading metrics change. |
60 bool IsMetricsReportingEnabled() const; | 60 void UpdateUploadPermissions(bool may_upload); |
61 | 61 |
62 // Returns true iff Rappor reporting is enabled. | 62 // Returns true iff Rappor reporting is enabled. |
63 bool IsRapporEnabled(bool metrics_enabled) const; | 63 bool IsRapporEnabled(bool metrics_enabled) const; |
64 | 64 |
65 // Returns the recording level for Rappor metrics. | 65 // Returns the recording level for Rappor metrics. |
66 rappor::RecordingLevel GetRapporRecordingLevel(bool metrics_enabled) const; | 66 rappor::RecordingLevel GetRapporRecordingLevel(bool metrics_enabled) const; |
67 | 67 |
68 private: | 68 private: |
69 // Returns the ChromeMetricsServiceClient, creating it if it hasn't been | 69 // Returns the ChromeMetricsServiceClient, creating it if it hasn't been |
70 // created yet (and additionally creating the MetricsService in that case). | 70 // created yet (and additionally creating the MetricsService in that case). |
(...skipping 17 matching lines...) Expand all Loading... |
88 // The RapporService, for RAPPOR metric uploads. | 88 // The RapporService, for RAPPOR metric uploads. |
89 scoped_ptr<rappor::RapporService> rappor_service_; | 89 scoped_ptr<rappor::RapporService> rappor_service_; |
90 | 90 |
91 // The VariationsService, for server-side experiments infrastructure. | 91 // The VariationsService, for server-side experiments infrastructure. |
92 scoped_ptr<chrome_variations::VariationsService> variations_service_; | 92 scoped_ptr<chrome_variations::VariationsService> variations_service_; |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager); | 94 DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager); |
95 }; | 95 }; |
96 | 96 |
97 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_ | 97 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_H_ |
OLD | NEW |