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_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ | 5 #ifndef COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ |
6 #define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ | 6 #define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_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/callback_list.h" | 11 #include "base/callback_list.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "components/google/core/browser/google_url_tracker_client.h" | 14 #include "components/google/core/browser/google_url_tracker_client.h" |
15 #include "components/keyed_service/core/keyed_service.h" | 15 #include "components/keyed_service/core/keyed_service.h" |
16 #include "net/base/network_change_notifier.h" | 16 #include "net/base/network_change_notifier.h" |
17 #include "net/url_request/url_fetcher.h" | 17 #include "net/url_request/url_fetcher.h" |
18 #include "net/url_request/url_fetcher_delegate.h" | 18 #include "net/url_request/url_fetcher_delegate.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 | 20 |
21 class PrefService; | |
22 | |
23 namespace infobars { | |
24 class InfoBar; | |
25 } | |
26 | |
27 namespace user_prefs { | 21 namespace user_prefs { |
28 class PrefRegistrySyncable; | 22 class PrefRegistrySyncable; |
29 } | 23 } |
30 | 24 |
31 // This object is responsible for checking the Google URL once per network | 25 // This object is responsible for checking the Google URL once per network |
32 // change. The current value is saved to prefs. | 26 // change. The current value is saved to prefs. |
33 // | 27 // |
34 // Most consumers should only call google_url(). Consumers who need to be | 28 // Most consumers should only call google_url(). Consumers who need to be |
35 // notified when things change should register a callback that provides the | 29 // notified when things change should register a callback that provides the |
36 // original and updated values via RegisterCallback(). | 30 // original and updated values via RegisterCallback(). |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // updated URL. If this is never set, we won't | 118 // updated URL. If this is never set, we won't |
125 // bother to fetch anything. | 119 // bother to fetch anything. |
126 // Consumers should register a callback via | 120 // Consumers should register a callback via |
127 // RegisterCallback(). | 121 // RegisterCallback(). |
128 base::WeakPtrFactory<GoogleURLTracker> weak_ptr_factory_; | 122 base::WeakPtrFactory<GoogleURLTracker> weak_ptr_factory_; |
129 | 123 |
130 DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker); | 124 DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker); |
131 }; | 125 }; |
132 | 126 |
133 #endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ | 127 #endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ |
OLD | NEW |