Index: content/browser/service_worker/service_worker_database.h |
diff --git a/content/browser/service_worker/service_worker_database.h b/content/browser/service_worker/service_worker_database.h |
index 8dd0b623eac0fcdb2b411aee2e36aad9b3c36de8..6b7dea0d3b83aa9b5ab2e1433850c72296471539 100644 |
--- a/content/browser/service_worker/service_worker_database.h |
+++ b/content/browser/service_worker/service_worker_database.h |
@@ -200,39 +200,34 @@ class CONTENT_EXPORT ServiceWorkerDatabase { |
const std::string& user_data_name, |
std::vector<std::pair<int64, std::string>>* user_data); |
- // As new resources are put into the diskcache, they go into an uncommitted |
- // list. When a registration is saved that refers to those ids, they're |
- // removed from that list. When a resource no longer has any registrations or |
+ // Resources should belong to one of following resource lists: uncommitted, |
+ // committed and purgeable. |
+ // As new resources are put into the diskcache, they go into the uncommitted |
+ // list. When a registration is saved that refers to those ids, they're moved |
+ // to the committed list. When a resource no longer has any registrations or |
// caches referring to it, it's added to the purgeable list. Periodically, |
// the purgeable list can be purged from the diskcache. At system startup, all |
// uncommitted ids are moved to the purgeable list. |
- // Reads uncommitted resource ids from the database. Returns OK on success. |
+ // Reads resource ids from the uncommitted list. Returns OK on success. |
// Otherwise clears |ids| and returns an error. |
Status GetUncommittedResourceIds(std::set<int64>* ids); |
- // Writes |ids| into the database as uncommitted resources. Returns OK on |
- // success. Otherwise writes nothing and returns an error. |
+ // Writes resource ids into the uncommitted list. Returns OK on success. |
+ // Otherwise writes nothing and returns an error. |
Status WriteUncommittedResourceIds(const std::set<int64>& ids); |
- // Deletes uncommitted resource ids specified by |ids| from the database. |
- // Returns OK on success. Otherwise deletes nothing and returns an error. |
- Status ClearUncommittedResourceIds(const std::set<int64>& ids); |
- |
- // Reads purgeable resource ids from the database. Returns OK on success. |
+ // Reads resource ids from the purgeable list. Returns OK on success. |
// Otherwise clears |ids| and returns an error. |
Status GetPurgeableResourceIds(std::set<int64>* ids); |
- // Writes |ids| into the database as purgeable resources. Returns OK on |
- // success. Otherwise writes nothing and returns an error. |
- Status WritePurgeableResourceIds(const std::set<int64>& ids); |
- |
- // Deletes purgeable resource ids specified by |ids| from the database. |
- // Returns OK on success. Otherwise deletes nothing and returns an error. |
+ // Deletes resource ids from the purgeable list. Returns OK on success. |
+ // Otherwise deletes nothing and returns an error. |
Status ClearPurgeableResourceIds(const std::set<int64>& ids); |
- // Moves |ids| from the uncommitted list to the purgeable list. |
- // Returns OK on success. Otherwise deletes nothing and returns an error. |
+ // Writes resource ids into the purgeable list and removes them from the |
+ // uncommitted list. Returns OK on success. Otherwise writes nothing and |
+ // returns an error. |
Status PurgeUncommittedResourceIds(const std::set<int64>& ids); |
// Deletes all data for |origins|, namely, unique origin, registrations and |
@@ -300,9 +295,6 @@ class CONTENT_EXPORT ServiceWorkerDatabase { |
// Write resource ids for |id_key_prefix| into the database. Returns OK on |
// success. Otherwise, returns writes nothing and returns an error. |
- Status WriteResourceIds( |
- const char* id_key_prefix, |
- const std::set<int64>& ids); |
Status WriteResourceIdsInBatch( |
const char* id_key_prefix, |
const std::set<int64>& ids, |
@@ -311,9 +303,6 @@ class CONTENT_EXPORT ServiceWorkerDatabase { |
// Deletes resource ids for |id_key_prefix| from the database. Returns OK if |
// it's successfully deleted or not found in the database. Otherwise, returns |
// an error. |
- Status DeleteResourceIds( |
- const char* id_key_prefix, |
- const std::set<int64>& ids); |
Status DeleteResourceIdsInBatch( |
const char* id_key_prefix, |
const std::set<int64>& ids, |