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

Side by Side Diff: chrome/browser/metrics/metrics_services_manager_client.h

Issue 1411593004: Eliminate //chrome dependencies from MetricsServicesManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_CLIENT_H_
6 #define CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_CLIENT_H_
7
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/threading/thread_checker.h"
12
13 namespace metrics {
14 class MetricsService;
15 class MetricsServiceClient;
16 }
17
18 namespace net {
19 class URLRequestContextGetter;
20 }
21
22 namespace rappor {
23 class RapporService;
24 }
25
26 namespace variations {
27 class VariationsService;
28 }
29
30 // MetricsServicesManagerClient is an interface that allows
31 // MetricsServicesManager to interact with its embedder.
32 class MetricsServicesManagerClient {
33 public:
34 virtual ~MetricsServicesManagerClient() {}
35
36 // Methods that create the various services in the context of the embedder.
37 virtual scoped_ptr<rappor::RapporService> CreateRapporService() = 0;
38 virtual scoped_ptr<variations::VariationsService>
39 CreateVariationsService() = 0;
40 virtual scoped_ptr<metrics::MetricsServiceClient>
41 CreateMetricsServiceClient() = 0;
42
43 // Returns the MetricsService* that is associated with
44 // |metrics_service_client|, which is guaranteed to be an instance that was
45 // created via a call to this object's CreateMetricsServiceClient() method.
46 virtual metrics::MetricsService* GetMetricsService(
47 metrics::MetricsServiceClient* metrics_service_client) = 0;
48
49 // Returns the URL request context in which the metrics services should
50 // operate.
51 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0;
52
53 // Returns whether safe browsing is enabled. If relevant in the embedder's
54 // context, |on_update_callback| will be set up to be called when the state of
55 // safe browsing changes.
56 virtual bool IsSafeBrowsingEnabled(
57 const base::Closure& on_update_callback) = 0;
58
59 // Returns whether metrics reporting is enabled.
60 virtual bool IsMetricsReportingEnabled() = 0;
61
62 // Whether the metrics services should record but not report metrics.
63 virtual bool OnlyDoMetricsRecording() = 0;
64 };
65
66 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICES_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698