diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 23:40:02 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 23:40:02 +0000 |
commit | d68a4fc6f448c6ebf407e2817320e7736c4735ee (patch) | |
tree | d76e2c91aa67af5a880ec81eddcbf2d12887e865 /chrome/browser/browsing_data_appcache_helper.h | |
parent | 63eb6c0bebc31046bbd954ef21dee86dca9d7fe3 (diff) | |
download | chromium_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_appcache_helper.h')
-rw-r--r-- | chrome/browser/browsing_data_appcache_helper.h | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/chrome/browser/browsing_data_appcache_helper.h b/chrome/browser/browsing_data_appcache_helper.h index aa04dae..695a271 100644 --- a/chrome/browser/browsing_data_appcache_helper.h +++ b/chrome/browser/browsing_data_appcache_helper.h @@ -11,6 +11,7 @@ #include "base/scoped_ptr.h" #include "base/task.h" #include "chrome/browser/appcache/chrome_appcache_service.h" +#include "chrome/browser/net/url_request_context_getter.h" class Profile; @@ -19,37 +20,15 @@ class Profile; class BrowsingDataAppCacheHelper : public base::RefCountedThreadSafe<BrowsingDataAppCacheHelper> { public: - // Contains detailed information about an appcache. - struct AppCacheInfo { - AppCacheInfo() {} - AppCacheInfo(const GURL& manifest_url, - int64 size, - base::Time creation_time, - base::Time last_access_time, - int64 group_id) - : manifest_url(manifest_url), - size(size), - creation_time(creation_time), - last_access_time(last_access_time), - group_id(group_id) { - } - - GURL manifest_url; - int64 size; - base::Time creation_time; - base::Time last_access_time; - int64 group_id; - }; - explicit BrowsingDataAppCacheHelper(Profile* profile); virtual void StartFetching(Callback0::Type* completion_callback); virtual void CancelNotification(); - virtual void DeleteAppCache(int64 group_id); + virtual void DeleteAppCacheGroup(const GURL& manifest_url); - const std::vector<AppCacheInfo>& info_list() const { + appcache::AppCacheInfoCollection* info_collection() const { DCHECK(!is_fetching_); - return info_list_; + return info_collection_; } private: @@ -58,13 +37,15 @@ class BrowsingDataAppCacheHelper virtual ~BrowsingDataAppCacheHelper() {} - void StartFetchingInIOThread(); - void OnFetchComplete(); - void DeleteAppCacheInIOThread(int64 group_id); + void OnFetchComplete(int rv); + ChromeAppCacheService* GetAppCacheService(); + scoped_refptr<URLRequestContextGetter> request_context_getter_; bool is_fetching_; - std::vector<AppCacheInfo> info_list_; scoped_ptr<Callback0::Type> completion_callback_; + scoped_refptr<appcache::AppCacheInfoCollection> info_collection_; + scoped_refptr<net::CancelableCompletionCallback<BrowsingDataAppCacheHelper> > + appcache_info_callback_; DISALLOW_COPY_AND_ASSIGN(BrowsingDataAppCacheHelper); }; |