| 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 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 // Callback when HTML5 file systems have been cleared. Invokes | 153 // Callback when HTML5 file systems have been cleared. Invokes |
| 154 // NotifyAndDeleteIfDone. | 154 // NotifyAndDeleteIfDone. |
| 155 void OnClearedFileSystems(); | 155 void OnClearedFileSystems(); |
| 156 | 156 |
| 157 // Invoked on the FILE thread to delete HTML5 file systems. | 157 // Invoked on the FILE thread to delete HTML5 file systems. |
| 158 void ClearFileSystemsOnFILEThread(); | 158 void ClearFileSystemsOnFILEThread(); |
| 159 | 159 |
| 160 // Callback when the appcache has been cleared. Invokes | 160 // Callback when the appcache has been cleared. Invokes |
| 161 // NotifyAndDeleteIfDone. | 161 // NotifyAndDeleteIfDone. |
| 162 void OnClearedAppCache(); | 162 void OnClearedAppCache(int rv); |
| 163 | 163 |
| 164 // Invoked on the IO thread to delete from the AppCache. | 164 // Invoked on the IO thread to delete from the AppCache. |
| 165 void ClearAppCacheOnIOThread(); | 165 void ClearAppCacheOnIOThread(); |
| 166 | 166 |
| 167 // Lower level helpers. | |
| 168 void OnGotAppCacheInfo(int rv); | |
| 169 void OnAppCacheDeleted(int rv); | |
| 170 | |
| 171 // Callback when Gears data has been deleted. Invokes NotifyAndDeleteIfDone. | 167 // Callback when Gears data has been deleted. Invokes NotifyAndDeleteIfDone. |
| 172 void OnClearedGearsData(); | 168 void OnClearedGearsData(); |
| 173 | 169 |
| 174 // Invoked on the FILE thread to delete old Gears data. | 170 // Invoked on the FILE thread to delete old Gears data. |
| 175 void ClearGearsDataOnFILEThread(const FilePath& profile_dir); | 171 void ClearGearsDataOnFILEThread(const FilePath& profile_dir); |
| 176 | 172 |
| 177 // Calculate the begin time for the deletion range specified by |time_period|. | 173 // Calculate the begin time for the deletion range specified by |time_period|. |
| 178 base::Time CalculateBeginDeleteTime(TimePeriod time_period); | 174 base::Time CalculateBeginDeleteTime(TimePeriod time_period); |
| 179 | 175 |
| 180 // Returns true if we're all done. | 176 // Returns true if we're all done. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 205 static bool removing_; | 201 static bool removing_; |
| 206 | 202 |
| 207 // Reference to database tracker held while deleting databases. | 203 // Reference to database tracker held while deleting databases. |
| 208 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 204 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
| 209 | 205 |
| 210 net::CompletionCallbackImpl<BrowsingDataRemover> database_cleared_callback_; | 206 net::CompletionCallbackImpl<BrowsingDataRemover> database_cleared_callback_; |
| 211 net::CompletionCallbackImpl<BrowsingDataRemover> cache_callback_; | 207 net::CompletionCallbackImpl<BrowsingDataRemover> cache_callback_; |
| 212 | 208 |
| 213 // Used to clear the appcache. | 209 // Used to clear the appcache. |
| 214 scoped_refptr<ChromeAppCacheService> appcache_service_; | 210 scoped_refptr<ChromeAppCacheService> appcache_service_; |
| 215 net::CompletionCallbackImpl<BrowsingDataRemover> appcache_got_info_callback_; | 211 net::CompletionCallbackImpl<BrowsingDataRemover> appcache_cleared_callback_; |
| 216 net::CompletionCallbackImpl<BrowsingDataRemover> appcache_deleted_callback_; | |
| 217 scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_; | |
| 218 int appcaches_to_be_deleted_count_; | |
| 219 | 212 |
| 220 // Used to delete data from the HTTP caches. | 213 // Used to delete data from the HTTP caches. |
| 221 CacheState next_cache_state_; | 214 CacheState next_cache_state_; |
| 222 disk_cache::Backend* cache_; | 215 disk_cache::Backend* cache_; |
| 223 | 216 |
| 224 // Used to delete data from HTTP cache and appcache. | 217 // Used to delete data from HTTP cache and appcache. |
| 225 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; | 218 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; |
| 226 scoped_refptr<net::URLRequestContextGetter> media_context_getter_; | 219 scoped_refptr<net::URLRequestContextGetter> media_context_getter_; |
| 227 | 220 |
| 228 // Used to delete plugin data. | 221 // Used to delete plugin data. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 241 | 234 |
| 242 ObserverList<Observer> observer_list_; | 235 ObserverList<Observer> observer_list_; |
| 243 | 236 |
| 244 // Used if we need to clear history. | 237 // Used if we need to clear history. |
| 245 CancelableRequestConsumer request_consumer_; | 238 CancelableRequestConsumer request_consumer_; |
| 246 | 239 |
| 247 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 240 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
| 248 }; | 241 }; |
| 249 | 242 |
| 250 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 243 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |