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" |
11 #include "base/metrics/field_trial.h" | 11 #include "base/metrics/field_trial.h" |
12 | 12 |
13 namespace metrics { | 13 namespace metrics { |
14 class MetricsServiceClient; | 14 class MetricsServiceClient; |
15 } | 15 } |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 class URLRequestContextGetter; | 18 class URLRequestContextGetter; |
19 } | 19 } |
20 | 20 |
21 namespace rappor { | 21 namespace rappor { |
22 class RapporService; | 22 class RapporServiceImpl; |
23 } | 23 } |
24 | 24 |
25 namespace variations { | 25 namespace variations { |
26 class VariationsService; | 26 class VariationsService; |
27 } | 27 } |
28 | 28 |
29 namespace metrics_services_manager { | 29 namespace metrics_services_manager { |
30 | 30 |
31 // MetricsServicesManagerClient is an interface that allows | 31 // MetricsServicesManagerClient is an interface that allows |
32 // MetricsServicesManager to interact with its embedder. | 32 // MetricsServicesManager to interact with its embedder. |
33 class MetricsServicesManagerClient { | 33 class MetricsServicesManagerClient { |
34 public: | 34 public: |
35 virtual ~MetricsServicesManagerClient() {} | 35 virtual ~MetricsServicesManagerClient() {} |
36 | 36 |
37 // Methods that create the various services in the context of the embedder. | 37 // Methods that create the various services in the context of the embedder. |
38 virtual std::unique_ptr<rappor::RapporService> CreateRapporService() = 0; | 38 virtual std::unique_ptr<rappor::RapporServiceImpl> |
| 39 CreateRapporServiceImpl() = 0; |
39 virtual std::unique_ptr<variations::VariationsService> | 40 virtual std::unique_ptr<variations::VariationsService> |
40 CreateVariationsService() = 0; | 41 CreateVariationsService() = 0; |
41 virtual std::unique_ptr<metrics::MetricsServiceClient> | 42 virtual std::unique_ptr<metrics::MetricsServiceClient> |
42 CreateMetricsServiceClient() = 0; | 43 CreateMetricsServiceClient() = 0; |
43 virtual std::unique_ptr<const base::FieldTrial::EntropyProvider> | 44 virtual std::unique_ptr<const base::FieldTrial::EntropyProvider> |
44 CreateEntropyProvider() = 0; | 45 CreateEntropyProvider() = 0; |
45 | 46 |
46 // Returns the URL request context in which the metrics services should | 47 // Returns the URL request context in which the metrics services should |
47 // operate. | 48 // operate. |
48 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; | 49 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; |
(...skipping 13 matching lines...) Expand all Loading... |
62 virtual bool OnlyDoMetricsRecording() = 0; | 63 virtual bool OnlyDoMetricsRecording() = 0; |
63 | 64 |
64 // Update the running state of metrics services managed by the embedder, for | 65 // Update the running state of metrics services managed by the embedder, for |
65 // example, crash reporting. | 66 // example, crash reporting. |
66 virtual void UpdateRunningServices(bool may_record, bool may_upload) {} | 67 virtual void UpdateRunningServices(bool may_record, bool may_upload) {} |
67 }; | 68 }; |
68 | 69 |
69 } // namespace metrics_services_manager | 70 } // namespace metrics_services_manager |
70 | 71 |
71 #endif // COMPONENTS_METRICS_SERVICES_MANAGER_METRICS_SERVICES_MANAGER_CLIENT_H
_ | 72 #endif // COMPONENTS_METRICS_SERVICES_MANAGER_METRICS_SERVICES_MANAGER_CLIENT_H
_ |
OLD | NEW |