Chromium Code Reviews| 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 "content/browser/appcache/chrome_appcache_service.h" | 15 #include "content/browser/appcache/chrome_appcache_service.h" |
| 16 #include "content/browser/cancelable_request.h" | 16 #include "content/browser/cancelable_request.h" |
| 17 #include "content/common/notification_observer.h" | 17 #include "content/common/notification_observer.h" |
| 18 #include "content/common/notification_registrar.h" | 18 #include "content/common/notification_registrar.h" |
| 19 #include "webkit/quota/quota_types.h" | |
| 19 | 20 |
| 20 class ExtensionSpecialStoragePolicy; | 21 class ExtensionSpecialStoragePolicy; |
| 21 class IOThread; | 22 class IOThread; |
| 22 class PluginDataRemover; | 23 class PluginDataRemover; |
| 23 class Profile; | 24 class Profile; |
| 24 | 25 |
| 25 namespace disk_cache { | 26 namespace disk_cache { |
| 26 class Backend; | 27 class Backend; |
| 27 } | 28 } |
| 28 | 29 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 // Invoked on the FILE thread to delete HTML5 databases. | 151 // Invoked on the FILE thread to delete HTML5 databases. |
| 151 void ClearDatabasesOnFILEThread(); | 152 void ClearDatabasesOnFILEThread(); |
| 152 | 153 |
| 153 // Callback when HTML5 file systems have been cleared. Invokes | 154 // Callback when HTML5 file systems have been cleared. Invokes |
| 154 // NotifyAndDeleteIfDone. | 155 // NotifyAndDeleteIfDone. |
| 155 void OnClearedFileSystems(); | 156 void OnClearedFileSystems(); |
| 156 | 157 |
| 157 // Invoked on the FILE thread to delete HTML5 file systems. | 158 // Invoked on the FILE thread to delete HTML5 file systems. |
| 158 void ClearFileSystemsOnFILEThread(); | 159 void ClearFileSystemsOnFILEThread(); |
| 159 | 160 |
| 161 // Callback to respond to QuotaManager::GetOriginsModifiedSince. | |
| 162 void ProcessTemporaryQuotaModifiedInTimeframe(const std::set<GURL>&); | |
| 163 | |
| 164 void DeleteOriginDataCallback(quota::QuotaStatusCode); | |
| 165 | |
| 160 // Callback when the appcache has been cleared. Invokes | 166 // Callback when the appcache has been cleared. Invokes |
| 161 // NotifyAndDeleteIfDone. | 167 // NotifyAndDeleteIfDone. |
| 162 void OnClearedAppCache(); | 168 void OnClearedAppCache(); |
| 163 | 169 |
| 164 // Invoked on the IO thread to delete from the AppCache. | 170 // Invoked on the IO thread to delete from the AppCache. |
| 165 void ClearAppCacheOnIOThread(); | 171 void ClearAppCacheOnIOThread(); |
| 166 | 172 |
| 167 // Lower level helpers. | 173 // Lower level helpers. |
| 168 void OnGotAppCacheInfo(int rv); | 174 void OnGotAppCacheInfo(int rv); |
| 169 void OnAppCacheDeleted(int rv); | 175 void OnAppCacheDeleted(int rv); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 base::WaitableEventWatcher watcher_; | 236 base::WaitableEventWatcher watcher_; |
| 231 | 237 |
| 232 // True if we're waiting for various data to be deleted. | 238 // True if we're waiting for various data to be deleted. |
| 233 bool waiting_for_clear_databases_; | 239 bool waiting_for_clear_databases_; |
| 234 bool waiting_for_clear_history_; | 240 bool waiting_for_clear_history_; |
| 235 bool waiting_for_clear_networking_history_; | 241 bool waiting_for_clear_networking_history_; |
| 236 bool waiting_for_clear_cache_; | 242 bool waiting_for_clear_cache_; |
| 237 bool waiting_for_clear_appcache_; | 243 bool waiting_for_clear_appcache_; |
| 238 bool waiting_for_clear_lso_data_; | 244 bool waiting_for_clear_lso_data_; |
| 239 bool waiting_for_clear_gears_data_; | 245 bool waiting_for_clear_gears_data_; |
| 240 bool waiting_for_clear_file_systems_; | 246 bool waiting_for_clear_file_systems_; |
|
michaeln
2011/07/21 23:49:15
I was thinking that use of the QuotaManager could
| |
| 241 | 247 |
| 248 // Tracking how many origins need to be deleted. | |
| 249 int temporary_quota_origins_to_delete_count_; | |
| 250 | |
| 242 ObserverList<Observer> observer_list_; | 251 ObserverList<Observer> observer_list_; |
| 243 | 252 |
| 244 // Used if we need to clear history. | 253 // Used if we need to clear history. |
| 245 CancelableRequestConsumer request_consumer_; | 254 CancelableRequestConsumer request_consumer_; |
| 246 | 255 |
| 247 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 256 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
| 248 }; | 257 }; |
| 249 | 258 |
| 250 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 259 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |