OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_ANDROID_PROVIDER_CHROME_BROWSER_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_PROVIDER_CHROME_BROWSER_PROVIDER_H_ |
6 #define CHROME_BROWSER_ANDROID_PROVIDER_CHROME_BROWSER_PROVIDER_H_ | 6 #define CHROME_BROWSER_ANDROID_PROVIDER_CHROME_BROWSER_PROVIDER_H_ |
7 | 7 |
8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
12 #include "base/task/cancelable_task_tracker.h" | 12 #include "base/task/cancelable_task_tracker.h" |
13 #include "chrome/browser/common/cancelable_request.h" | |
14 #include "chrome/browser/history/android/android_history_types.h" | 13 #include "chrome/browser/history/android/android_history_types.h" |
15 #include "components/bookmarks/browser/base_bookmark_model_observer.h" | 14 #include "components/bookmarks/browser/base_bookmark_model_observer.h" |
16 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
17 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
18 | 17 |
19 class AndroidHistoryProviderService; | 18 class AndroidHistoryProviderService; |
20 class FaviconService; | 19 class FaviconService; |
21 class Profile; | 20 class Profile; |
22 | 21 |
23 namespace history { | 22 namespace history { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 186 |
188 JavaObjectWeakGlobalRef weak_java_provider_; | 187 JavaObjectWeakGlobalRef weak_java_provider_; |
189 | 188 |
190 Profile* profile_; | 189 Profile* profile_; |
191 BookmarkModel* bookmark_model_; | 190 BookmarkModel* bookmark_model_; |
192 history::TopSites* top_sites_; | 191 history::TopSites* top_sites_; |
193 | 192 |
194 scoped_ptr<AndroidHistoryProviderService> service_; | 193 scoped_ptr<AndroidHistoryProviderService> service_; |
195 scoped_ptr<FaviconService> favicon_service_; | 194 scoped_ptr<FaviconService> favicon_service_; |
196 | 195 |
197 // Different cancelable request consumers must be used for each service. | |
198 // This because a synchronization issue that could lead to flaky assertion | |
199 // failures otherwise. | |
200 // TODO(leandrogracia): use a single consumer once http://crbug.com/85970 | |
201 // is fixed. | |
202 CancelableRequestConsumer android_history_consumer_; | |
203 CancelableRequestConsumer favicon_consumer_; | |
204 | |
205 base::CancelableTaskTracker cancelable_task_tracker_; | 196 base::CancelableTaskTracker cancelable_task_tracker_; |
206 | 197 |
207 // Used to register/unregister notification observer. | 198 // Used to register/unregister notification observer. |
208 content::NotificationRegistrar notification_registrar_; | 199 content::NotificationRegistrar notification_registrar_; |
209 | 200 |
210 bool handling_extensive_changes_; | 201 bool handling_extensive_changes_; |
211 | 202 |
212 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserProvider); | 203 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserProvider); |
213 }; | 204 }; |
214 | 205 |
215 #endif // CHROME_BROWSER_ANDROID_PROVIDER_CHROME_BROWSER_PROVIDER_H_ | 206 #endif // CHROME_BROWSER_ANDROID_PROVIDER_CHROME_BROWSER_PROVIDER_H_ |
OLD | NEW |