| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_METRICS_SERVICES_MANAGER_METRICS_SERVICES_MANAGER_CLIENT_H_ | 5 #ifndef COMPONENTS_METRICS_SERVICES_MANAGER_METRICS_SERVICES_MANAGER_CLIENT_H_ |
| 6 #define COMPONENTS_METRICS_SERVICES_MANAGER_METRICS_SERVICES_MANAGER_CLIENT_H_ | 6 #define COMPONENTS_METRICS_SERVICES_MANAGER_METRICS_SERVICES_MANAGER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 CreateVariationsService() = 0; | 41 CreateVariationsService() = 0; |
| 42 virtual std::unique_ptr<metrics::MetricsServiceClient> | 42 virtual std::unique_ptr<metrics::MetricsServiceClient> |
| 43 CreateMetricsServiceClient() = 0; | 43 CreateMetricsServiceClient() = 0; |
| 44 virtual std::unique_ptr<const base::FieldTrial::EntropyProvider> | 44 virtual std::unique_ptr<const base::FieldTrial::EntropyProvider> |
| 45 CreateEntropyProvider() = 0; | 45 CreateEntropyProvider() = 0; |
| 46 | 46 |
| 47 // Returns the URL request context in which the metrics services should | 47 // Returns the URL request context in which the metrics services should |
| 48 // operate. | 48 // operate. |
| 49 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; | 49 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; |
| 50 | 50 |
| 51 // Returns whether safe browsing is enabled. If relevant in the embedder's | |
| 52 // context, |on_update_callback| will be set up to be called when the state of | |
| 53 // safe browsing changes. |on_update_callback| is guaranteed to be valid for | |
| 54 // the lifetime of this client instance, but should not be used beyond this | |
| 55 // instance being destroyed. | |
| 56 virtual bool IsSafeBrowsingEnabled( | |
| 57 const base::Closure& on_update_callback) = 0; | |
| 58 | |
| 59 // Returns whether metrics reporting is enabled. | 51 // Returns whether metrics reporting is enabled. |
| 60 virtual bool IsMetricsReportingEnabled() = 0; | 52 virtual bool IsMetricsReportingEnabled() = 0; |
| 61 | 53 |
| 62 // Whether the metrics services should record but not report metrics. | 54 // Whether the metrics services should record but not report metrics. |
| 63 virtual bool OnlyDoMetricsRecording() = 0; | 55 virtual bool OnlyDoMetricsRecording() = 0; |
| 64 | 56 |
| 65 // Update the running state of metrics services managed by the embedder, for | 57 // Update the running state of metrics services managed by the embedder, for |
| 66 // example, crash reporting. | 58 // example, crash reporting. |
| 67 virtual void UpdateRunningServices(bool may_record, bool may_upload) {} | 59 virtual void UpdateRunningServices(bool may_record, bool may_upload) {} |
| 68 }; | 60 }; |
| 69 | 61 |
| 70 } // namespace metrics_services_manager | 62 } // namespace metrics_services_manager |
| 71 | 63 |
| 72 #endif // COMPONENTS_METRICS_SERVICES_MANAGER_METRICS_SERVICES_MANAGER_CLIENT_H
_ | 64 #endif // COMPONENTS_METRICS_SERVICES_MANAGER_METRICS_SERVICES_MANAGER_CLIENT_H
_ |
| OLD | NEW |