| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(); |
| 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. | 167 // Lower level helpers. |
| 168 void OnGotAppCacheInfo(int rv); | 168 void OnGotAppCacheInfo(int rv); |
| 169 void OnAppCacheDeleted(int rv); | 169 void OnAppCacheDeleted(int rv); |
| 170 ChromeAppCacheService* GetAppCacheService(); | |
| 171 | 170 |
| 172 // Callback when Gears data has been deleted. Invokes NotifyAndDeleteIfDone. | 171 // Callback when Gears data has been deleted. Invokes NotifyAndDeleteIfDone. |
| 173 void OnClearedGearsData(); | 172 void OnClearedGearsData(); |
| 174 | 173 |
| 175 // Invoked on the FILE thread to delete old Gears data. | 174 // Invoked on the FILE thread to delete old Gears data. |
| 176 void ClearGearsDataOnFILEThread(const FilePath& profile_dir); | 175 void ClearGearsDataOnFILEThread(const FilePath& profile_dir); |
| 177 | 176 |
| 178 // Calculate the begin time for the deletion range specified by |time_period|. | 177 // Calculate the begin time for the deletion range specified by |time_period|. |
| 179 base::Time CalculateBeginDeleteTime(TimePeriod time_period); | 178 base::Time CalculateBeginDeleteTime(TimePeriod time_period); |
| 180 | 179 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 205 // True if Remove has been invoked. | 204 // True if Remove has been invoked. |
| 206 static bool removing_; | 205 static bool removing_; |
| 207 | 206 |
| 208 // Reference to database tracker held while deleting databases. | 207 // Reference to database tracker held while deleting databases. |
| 209 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 208 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
| 210 | 209 |
| 211 net::CompletionCallbackImpl<BrowsingDataRemover> database_cleared_callback_; | 210 net::CompletionCallbackImpl<BrowsingDataRemover> database_cleared_callback_; |
| 212 net::CompletionCallbackImpl<BrowsingDataRemover> cache_callback_; | 211 net::CompletionCallbackImpl<BrowsingDataRemover> cache_callback_; |
| 213 | 212 |
| 214 // Used to clear the appcache. | 213 // Used to clear the appcache. |
| 214 scoped_refptr<ChromeAppCacheService> appcache_service_; |
| 215 net::CompletionCallbackImpl<BrowsingDataRemover> appcache_got_info_callback_; | 215 net::CompletionCallbackImpl<BrowsingDataRemover> appcache_got_info_callback_; |
| 216 net::CompletionCallbackImpl<BrowsingDataRemover> appcache_deleted_callback_; | 216 net::CompletionCallbackImpl<BrowsingDataRemover> appcache_deleted_callback_; |
| 217 scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_; | 217 scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_; |
| 218 int appcaches_to_be_deleted_count_; | 218 int appcaches_to_be_deleted_count_; |
| 219 | 219 |
| 220 // Used to delete data from the HTTP caches. | 220 // Used to delete data from the HTTP caches. |
| 221 CacheState next_cache_state_; | 221 CacheState next_cache_state_; |
| 222 disk_cache::Backend* cache_; | 222 disk_cache::Backend* cache_; |
| 223 | 223 |
| 224 // Used to delete data from HTTP cache and appcache. | 224 // Used to delete data from HTTP cache and appcache. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 241 | 241 |
| 242 ObserverList<Observer> observer_list_; | 242 ObserverList<Observer> observer_list_; |
| 243 | 243 |
| 244 // Used if we need to clear history. | 244 // Used if we need to clear history. |
| 245 CancelableRequestConsumer request_consumer_; | 245 CancelableRequestConsumer request_consumer_; |
| 246 | 246 |
| 247 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 247 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
| 248 }; | 248 }; |
| 249 | 249 |
| 250 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 250 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |