OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_ | 5 #ifndef COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_ |
6 #define COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_ | 6 #define COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "url/gurl.h" |
9 | 10 |
10 class GoogleURLTracker; | 11 class GoogleURLTracker; |
11 class PrefService; | 12 class PrefService; |
12 | 13 |
13 namespace net { | 14 namespace net { |
14 class URLRequestContextGetter; | 15 class URLRequestContextGetter; |
15 } | 16 } |
16 | 17 |
17 // Interface by which GoogleURLTracker communicates with its embedder. | 18 // Interface by which GoogleURLTracker communicates with its embedder. |
18 class GoogleURLTrackerClient { | 19 class GoogleURLTrackerClient { |
(...skipping 17 matching lines...) Expand all Loading... |
36 // Returns whether background networking is enabled. | 37 // Returns whether background networking is enabled. |
37 virtual bool IsBackgroundNetworkingEnabled() = 0; | 38 virtual bool IsBackgroundNetworkingEnabled() = 0; |
38 | 39 |
39 // Returns the PrefService that the GoogleURLTracker should use. | 40 // Returns the PrefService that the GoogleURLTracker should use. |
40 virtual PrefService* GetPrefs() = 0; | 41 virtual PrefService* GetPrefs() = 0; |
41 | 42 |
42 // Returns the URL request context information that the GoogleURLTracker | 43 // Returns the URL request context information that the GoogleURLTracker |
43 // should use. | 44 // should use. |
44 virtual net::URLRequestContextGetter* GetRequestContext() = 0; | 45 virtual net::URLRequestContextGetter* GetRequestContext() = 0; |
45 | 46 |
| 47 // Returns whether |url| is for a Google domain. |
| 48 // TODO(blundell): Eliminate this method in favor of having callers call |
| 49 // google_util::IsGoogleDomainURL() directly once google_util is |
| 50 // componentized. crbug.com/381088 |
| 51 virtual bool IsGoogleDomainURL(const GURL& url) = 0; |
| 52 |
| 53 // Appends the Google locale as a param to |url|. |
| 54 // TODO(blundell): Eliminate this method in favor of having callers call |
| 55 // google_util::AppendGoogleLocaleParam() directly once google_util is |
| 56 // componentized. crbug.com/381088 |
| 57 virtual GURL AppendGoogleLocaleParam(const GURL& url) = 0; |
| 58 |
46 protected: | 59 protected: |
47 GoogleURLTracker* google_url_tracker() { return google_url_tracker_; } | 60 GoogleURLTracker* google_url_tracker() { return google_url_tracker_; } |
48 | 61 |
49 private: | 62 private: |
50 GoogleURLTracker* google_url_tracker_; | 63 GoogleURLTracker* google_url_tracker_; |
51 | 64 |
52 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerClient); | 65 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerClient); |
53 }; | 66 }; |
54 | 67 |
55 #endif // COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_ | 68 #endif // COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_ |
OLD | NEW |