Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / google / core / browser / google_url_tracker_client.h
blob58f51a7d74ba7f63174110eb4fedc8d217d6e720
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_
6 #define COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_
8 #include "base/macros.h"
9 #include "url/gurl.h"
11 class GoogleURLTracker;
12 class PrefService;
14 namespace net {
15 class URLRequestContextGetter;
18 // Interface by which GoogleURLTracker communicates with its embedder.
19 class GoogleURLTrackerClient {
20 public:
21 GoogleURLTrackerClient();
22 virtual ~GoogleURLTrackerClient();
24 // Sets the GoogleURLTracker that is associated with this client.
25 void set_google_url_tracker(GoogleURLTracker* google_url_tracker) {
26 google_url_tracker_ = google_url_tracker;
29 // Returns whether background networking is enabled.
30 virtual bool IsBackgroundNetworkingEnabled() = 0;
32 // Returns the PrefService that the GoogleURLTracker should use.
33 virtual PrefService* GetPrefs() = 0;
35 // Returns the URL request context information that the GoogleURLTracker
36 // should use.
37 virtual net::URLRequestContextGetter* GetRequestContext() = 0;
39 protected:
40 GoogleURLTracker* google_url_tracker() { return google_url_tracker_; }
42 private:
43 GoogleURLTracker* google_url_tracker_;
45 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerClient);
48 #endif // COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_