summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_appcache_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/browsing_data_appcache_helper.h')
-rw-r--r--chrome/browser/browsing_data_appcache_helper.h39
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);
};