Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Unified Diff: content/browser/service_worker/service_worker_storage.h

Issue 1393783002: ServiceWorker: Schedule DeleteAndStartOver when failing to store resource ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify the patch Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_storage.h
diff --git a/content/browser/service_worker/service_worker_storage.h b/content/browser/service_worker/service_worker_storage.h
index 29cf02c36f3136f295501c80709efe5602ef5c53..7c82915cba2e75885bb7fd072d00e41db14b13eb 100644
--- a/content/browser/service_worker/service_worker_storage.h
+++ b/content/browser/service_worker/service_worker_storage.h
@@ -148,13 +148,14 @@ class CONTENT_EXPORT ServiceWorkerStorage
scoped_ptr<ServiceWorkerResponseMetadataWriter> CreateResponseMetadataWriter(
int64 response_id);
- // Adds |id| to the set of resources ids that are in the disk
- // cache but not yet stored with a registration.
- void StoreUncommittedResponseId(int64 id);
+ // Adds |resource_id| to the set of resources that are in the disk cache
+ // but not yet stored with a registration.
+ void StoreUncommittedResourceId(int64 resource_id);
- // Removes |id| from uncommitted list, adds it to the
- // purgeable list and purges it.
- void DoomUncommittedResponse(int64 id);
+ // Removes resource ids from uncommitted list, adds them to the purgeable list
+ // and purges them.
+ void DoomUncommittedResource(int64 resource_id);
+ void DoomUncommittedResources(const std::set<int64>& resource_ids);
// Provide a storage mechanism to read/write arbitrary data associated with
// a registration. Each registration has its own key namespace. Stored data
@@ -360,6 +361,9 @@ class CONTENT_EXPORT ServiceWorkerStorage
const ServiceWorkerDatabase::RegistrationData& deleted_version,
const std::vector<int64>& newly_purgeable_resources,
ServiceWorkerDatabase::Status status);
+ void DidWriteUncommittedResourceIds(ServiceWorkerDatabase::Status status);
+ void DidPurgeUncommittedResourceIds(const std::set<int64>& resource_ids,
+ ServiceWorkerDatabase::Status status);
void DidStoreUserData(
const StatusCallback& callback,
ServiceWorkerDatabase::Status status);
@@ -401,7 +405,8 @@ class CONTENT_EXPORT ServiceWorkerStorage
void DeleteOldDiskCache();
- void StartPurgingResources(const std::vector<int64>& ids);
+ void StartPurgingResources(const std::set<int64>& resource_ids);
+ void StartPurgingResources(const std::vector<int64>& resource_ids);
void StartPurgingResources(const ResourceList& resources);
void ContinuePurgingResources();
void PurgeResource(int64 id);

Powered by Google App Engine
This is Rietveld 408576698