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

Side by Side Diff: components/metrics_services_manager/metrics_services_manager_client.h

Issue 1918083002: Convert //components/[f-n]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: … Created 4 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
OLDNEW
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>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 #include "base/memory/scoped_ptr.h"
10 11
11 namespace metrics { 12 namespace metrics {
12 class MetricsServiceClient; 13 class MetricsServiceClient;
13 } 14 }
14 15
15 namespace net { 16 namespace net {
16 class URLRequestContextGetter; 17 class URLRequestContextGetter;
17 } 18 }
18 19
19 namespace rappor { 20 namespace rappor {
20 class RapporService; 21 class RapporService;
21 } 22 }
22 23
23 namespace variations { 24 namespace variations {
24 class VariationsService; 25 class VariationsService;
25 } 26 }
26 27
27 namespace metrics_services_manager { 28 namespace metrics_services_manager {
28 29
29 // MetricsServicesManagerClient is an interface that allows 30 // MetricsServicesManagerClient is an interface that allows
30 // MetricsServicesManager to interact with its embedder. 31 // MetricsServicesManager to interact with its embedder.
31 class MetricsServicesManagerClient { 32 class MetricsServicesManagerClient {
32 public: 33 public:
33 virtual ~MetricsServicesManagerClient() {} 34 virtual ~MetricsServicesManagerClient() {}
34 35
35 // Methods that create the various services in the context of the embedder. 36 // Methods that create the various services in the context of the embedder.
36 virtual scoped_ptr<rappor::RapporService> CreateRapporService() = 0; 37 virtual std::unique_ptr<rappor::RapporService> CreateRapporService() = 0;
37 virtual scoped_ptr<variations::VariationsService> 38 virtual std::unique_ptr<variations::VariationsService>
38 CreateVariationsService() = 0; 39 CreateVariationsService() = 0;
39 virtual scoped_ptr<metrics::MetricsServiceClient> 40 virtual std::unique_ptr<metrics::MetricsServiceClient>
40 CreateMetricsServiceClient() = 0; 41 CreateMetricsServiceClient() = 0;
41 42
42 // Returns the URL request context in which the metrics services should 43 // Returns the URL request context in which the metrics services should
43 // operate. 44 // operate.
44 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; 45 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0;
45 46
46 // Returns whether safe browsing is enabled. If relevant in the embedder's 47 // Returns whether safe browsing is enabled. If relevant in the embedder's
47 // context, |on_update_callback| will be set up to be called when the state of 48 // context, |on_update_callback| will be set up to be called when the state of
48 // safe browsing changes. |on_update_callback| is guaranteed to be valid for 49 // safe browsing changes. |on_update_callback| is guaranteed to be valid for
49 // the lifetime of this client instance, but should not be used beyond this 50 // the lifetime of this client instance, but should not be used beyond this
50 // instance being destroyed. 51 // instance being destroyed.
51 virtual bool IsSafeBrowsingEnabled( 52 virtual bool IsSafeBrowsingEnabled(
52 const base::Closure& on_update_callback) = 0; 53 const base::Closure& on_update_callback) = 0;
53 54
54 // Returns whether metrics reporting is enabled. 55 // Returns whether metrics reporting is enabled.
55 virtual bool IsMetricsReportingEnabled() = 0; 56 virtual bool IsMetricsReportingEnabled() = 0;
56 57
57 // Whether the metrics services should record but not report metrics. 58 // Whether the metrics services should record but not report metrics.
58 virtual bool OnlyDoMetricsRecording() = 0; 59 virtual bool OnlyDoMetricsRecording() = 0;
59 }; 60 };
60 61
61 } // namespace metrics_services_manager 62 } // namespace metrics_services_manager
62 63
63 #endif // COMPONENTS_METRICS_SERVICES_MANAGER_METRICS_SERVICES_MANAGER_CLIENT_H _ 64 #endif // COMPONENTS_METRICS_SERVICES_MANAGER_METRICS_SERVICES_MANAGER_CLIENT_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698