| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSING_DATA_REMOVER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
| 6 #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "base/synchronization/waitable_event_watcher.h" | 13 #include "base/synchronization/waitable_event_watcher.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "chrome/browser/prefs/pref_member.h" | 15 #include "chrome/browser/prefs/pref_member.h" |
| 16 #include "content/browser/appcache/chrome_appcache_service.h" | 16 #include "content/browser/appcache/chrome_appcache_service.h" |
| 17 #include "content/browser/cancelable_request.h" | 17 #include "content/browser/cancelable_request.h" |
| 18 #include "content/public/browser/notification_observer.h" | 18 #include "content/public/browser/notification_observer.h" |
| 19 #include "content/public/browser/notification_registrar.h" | 19 #include "content/public/browser/notification_registrar.h" |
| 20 #include "webkit/quota/quota_types.h" | 20 #include "webkit/quota/quota_types.h" |
| 21 | 21 |
| 22 class ExtensionSpecialStoragePolicy; | 22 class ExtensionSpecialStoragePolicy; |
| 23 class IOThread; | 23 class IOThread; |
| 24 class Profile; |
| 25 |
| 26 namespace content { |
| 24 class PluginDataRemover; | 27 class PluginDataRemover; |
| 25 class Profile; | 28 } |
| 26 | 29 |
| 27 namespace disk_cache { | 30 namespace disk_cache { |
| 28 class Backend; | 31 class Backend; |
| 29 } | 32 } |
| 30 | 33 |
| 31 namespace net { | 34 namespace net { |
| 32 class URLRequestContextGetter; | 35 class URLRequestContextGetter; |
| 33 } | 36 } |
| 34 | 37 |
| 35 namespace webkit_database { | 38 namespace webkit_database { |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 // Used to delete data from the HTTP caches. | 234 // Used to delete data from the HTTP caches. |
| 232 net::OldCompletionCallbackImpl<BrowsingDataRemover> cache_callback_; | 235 net::OldCompletionCallbackImpl<BrowsingDataRemover> cache_callback_; |
| 233 CacheState next_cache_state_; | 236 CacheState next_cache_state_; |
| 234 disk_cache::Backend* cache_; | 237 disk_cache::Backend* cache_; |
| 235 | 238 |
| 236 // Used to delete data from HTTP cache. | 239 // Used to delete data from HTTP cache. |
| 237 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; | 240 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; |
| 238 scoped_refptr<net::URLRequestContextGetter> media_context_getter_; | 241 scoped_refptr<net::URLRequestContextGetter> media_context_getter_; |
| 239 | 242 |
| 240 // Used to delete plugin data. | 243 // Used to delete plugin data. |
| 241 scoped_refptr<PluginDataRemover> plugin_data_remover_; | 244 scoped_ptr<content::PluginDataRemover> plugin_data_remover_; |
| 242 base::WaitableEventWatcher watcher_; | 245 base::WaitableEventWatcher watcher_; |
| 243 | 246 |
| 244 // True if we're waiting for various data to be deleted. | 247 // True if we're waiting for various data to be deleted. |
| 245 // These may only be accessed from UI thread in order to avoid races! | 248 // These may only be accessed from UI thread in order to avoid races! |
| 246 bool waiting_for_clear_history_; | 249 bool waiting_for_clear_history_; |
| 247 bool waiting_for_clear_quota_managed_data_; | 250 bool waiting_for_clear_quota_managed_data_; |
| 248 bool waiting_for_clear_networking_history_; | 251 bool waiting_for_clear_networking_history_; |
| 249 bool waiting_for_clear_cookies_; | 252 bool waiting_for_clear_cookies_; |
| 250 bool waiting_for_clear_cache_; | 253 bool waiting_for_clear_cache_; |
| 251 bool waiting_for_clear_lso_data_; | 254 bool waiting_for_clear_lso_data_; |
| 252 | 255 |
| 253 // Tracking how many origins need to be deleted, and whether we're finished | 256 // Tracking how many origins need to be deleted, and whether we're finished |
| 254 // gathering origins. | 257 // gathering origins. |
| 255 int quota_managed_origins_to_delete_count_; | 258 int quota_managed_origins_to_delete_count_; |
| 256 int quota_managed_storage_types_to_delete_count_; | 259 int quota_managed_storage_types_to_delete_count_; |
| 257 | 260 |
| 258 ObserverList<Observer> observer_list_; | 261 ObserverList<Observer> observer_list_; |
| 259 | 262 |
| 260 // Used if we need to clear history. | 263 // Used if we need to clear history. |
| 261 CancelableRequestConsumer request_consumer_; | 264 CancelableRequestConsumer request_consumer_; |
| 262 | 265 |
| 263 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 266 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
| 264 }; | 267 }; |
| 265 | 268 |
| 266 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 269 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |