Index: webkit/appcache/appcache_service.h |
diff --git a/webkit/appcache/appcache_service.h b/webkit/appcache/appcache_service.h |
index 4952c941270c17ab87b63d78ae5d273c53652229..ae0fc9dda693ff884380aedc0605602a078891f4 100644 |
--- a/webkit/appcache/appcache_service.h |
+++ b/webkit/appcache/appcache_service.h |
@@ -73,16 +73,16 @@ class AppCacheService { |
// Populates 'collection' with info about all of the appcaches stored |
// within the service, 'callback' is invoked upon completion. The service |
// acquires a reference to the 'collection' until until completion. |
- // This method always completes asynchronously. |
- void GetAllAppCacheInfo(AppCacheInfoCollection* collection, |
- net::CompletionCallback* callback); |
- |
- // Deletes the group identified by 'manifest_url', 'callback' is |
- // invoked upon completion. Upon completion, the cache group and |
- // any resources within the group are no longer loadable and all |
- // subresource loads for pages associated with a deleted group |
- // will fail. This method always completes asynchronously. |
- void DeleteAppCacheGroup(const GURL& manifest_url, |
+ // This method always completes asynchronously. (virtual for unittesting) |
+ virtual void GetAllAppCacheInfo(AppCacheInfoCollection* collection, |
+ net::CompletionCallback* callback); |
+ |
+ // Deletes the group identified by 'manifest_url', 'callback' is invoked upon |
+ // completion. Upon completion, the cache group and any resources within the |
+ // group are no longer loadable and all subresource loads for pages associated |
+ // with a deleted group will fail. This method always completes |
+ // asynchronously. (virtual for unittesting) |
+ virtual void DeleteAppCacheGroup(const GURL& manifest_url, |
net::CompletionCallback* callback); |
// Deletes all appcaches for the origin, 'callback' is invoked upon |
@@ -132,6 +132,10 @@ class AppCacheService { |
AppCacheStorage* storage() const { return storage_.get(); } |
+ bool clear_local_state_on_exit() const { return clear_local_state_on_exit_; } |
+ void set_clear_local_state_on_exit(bool clear_local_state_on_exit) { |
+ clear_local_state_on_exit_ = clear_local_state_on_exit; } |
+ |
protected: |
friend class AppCacheStorageImplTest; |
friend class AppCacheServiceTest; |
@@ -147,13 +151,16 @@ class AppCacheService { |
AppCachePolicy* appcache_policy_; |
AppCacheQuotaClient* quota_client_; |
- scoped_ptr<AppCacheStorage> storage_; |
+ // special_storage_policy_ must outlive storage_; ~AppCacheStorageImpl |
+ // accesses special_storage_policy_. |
michaeln
2011/07/14 22:53:16
right... that's pretty subtle... commenting the da
marja(google)
2011/07/15 11:03:42
Done.
|
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
+ scoped_ptr<AppCacheStorage> storage_; |
scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; |
PendingAsyncHelpers pending_helpers_; |
BackendMap backends_; // One 'backend' per child process. |
// Context for use during cache updates. |
net::URLRequestContext* request_context_; |
+ bool clear_local_state_on_exit_; |
DISALLOW_COPY_AND_ASSIGN(AppCacheService); |
}; |