summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_remover.h
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 23:40:02 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 23:40:02 +0000
commitd68a4fc6f448c6ebf407e2817320e7736c4735ee (patch)
treed76e2c91aa67af5a880ec81eddcbf2d12887e865 /chrome/browser/browsing_data_remover.h
parent63eb6c0bebc31046bbd954ef21dee86dca9d7fe3 (diff)
downloadchromium_src-d68a4fc6f448c6ebf407e2817320e7736c4735ee.zip
chromium_src-d68a4fc6f448c6ebf407e2817320e7736c4735ee.tar.gz
chromium_src-d68a4fc6f448c6ebf407e2817320e7736c4735ee.tar.bz2
Hook up the content settings UI to the appcache.
* Populate the tree view with appcaches * Delete selected appcaches from the tree view * Delete the date range indicated in the browsing data remover TEST=manual BUG=34634 Review URL: http://codereview.chromium.org/660423 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_remover.h')
-rw-r--r--chrome/browser/browsing_data_remover.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h
index 74ba60e..591427c 100644
--- a/chrome/browser/browsing_data_remover.h
+++ b/chrome/browser/browsing_data_remover.h
@@ -8,6 +8,7 @@
#include "base/observer_list.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
+#include "chrome/browser/appcache/chrome_appcache_service.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/common/notification_registrar.h"
#include "webkit/database/database_tracker.h"
@@ -104,13 +105,26 @@ class BrowsingDataRemover : public NotificationObserver {
// Invoked on the FILE thread to delete HTML5 databases.
void ClearDatabasesOnFILEThread(base::Time delete_begin);
+ // Callback when the appcache has been cleared. Invokes
+ // NotifyAndDeleteIfDone.
+ void OnClearedAppCache();
+
+ // Invoked on the IO thread to delete from the AppCache.
+ void ClearAppCacheOnIOThread(base::Time delete_begin);
+
+ // Lower level helpers.
+ void OnGotAppCacheInfo(int rv);
+ void OnAppCacheDeleted(int rv);
+ ChromeAppCacheService* GetAppCacheService();
+
// Calculate the begin time for the deletion range specified by |time_period|.
base::Time CalculateBeginDeleteTime(TimePeriod time_period);
// Returns true if we're all done.
bool all_done() {
return registrar_.IsEmpty() && !waiting_for_clear_cache_ &&
- !waiting_for_clear_history_ && !waiting_for_clear_databases_;
+ !waiting_for_clear_history_ && !waiting_for_clear_databases_ &&
+ !waiting_for_clear_appcache_;
}
NotificationRegistrar registrar_;
@@ -132,14 +146,18 @@ class BrowsingDataRemover : public NotificationObserver {
net::CompletionCallbackImpl<BrowsingDataRemover> database_cleared_callback_;
- // True if we're waiting for HTML5 databases to be deleted.
- bool waiting_for_clear_databases_;
+ // Used to clear the appcache.
+ net::CompletionCallbackImpl<BrowsingDataRemover> appcache_got_info_callback_;
+ net::CompletionCallbackImpl<BrowsingDataRemover> appcache_deleted_callback_;
+ scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_;
+ scoped_refptr<URLRequestContextGetter> request_context_getter_;
+ int appcaches_to_be_deleted_count_;
- // True if we're waiting for the history to be deleted.
+ // True if we're waiting for various data to be deleted.
+ bool waiting_for_clear_databases_;
bool waiting_for_clear_history_;
-
- // True if we're waiting for the cache to be cleared.
bool waiting_for_clear_cache_;
+ bool waiting_for_clear_appcache_;
ObserverList<Observer> observer_list_;