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

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

Issue 672813002: [ServiceWorker] Added size deltas and total size computation for QuotaM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added tests Created 6 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_database.h
diff --git a/content/browser/service_worker/service_worker_database.h b/content/browser/service_worker/service_worker_database.h
index 59b27648155b2298d6ba4fc8cd73a4f8834602bd..96283c95bd6178dd9b1b33595a9327bf78c361cb 100644
--- a/content/browser/service_worker/service_worker_database.h
+++ b/content/browser/service_worker/service_worker_database.h
@@ -65,7 +65,7 @@ class CONTENT_EXPORT ServiceWorkerDatabase {
base::Time last_update_check;
// Not populated until ServiceWorkerStorage::StoreRegistration is called.
- uint64 resources_total_size_bytes;
+ int64_t resources_total_size_bytes;
RegistrationData();
~RegistrationData();
@@ -123,15 +123,15 @@ class CONTENT_EXPORT ServiceWorkerDatabase {
// Writes |registration| and |resources| into the database and does following
// things:
// - If an old version of the registration exists, deletes it and sets
- // |deleted_version_id| to the old version id and
+ // |deleted_version| to the old version registration data object
// |newly_purgeable_resources| to its resources. Otherwise, sets
- // |deleted_version_id| to -1.
+ // |deleted_version->version_id| to -1.
// - Bumps the next registration id and the next version id if needed.
// - Removes |resources| from the uncommitted list if exist.
// Returns OK they are successfully written. Otherwise, returns an error.
Status WriteRegistration(const RegistrationData& registration,
const std::vector<ResourceRecord>& resources,
- int64* deleted_version_id,
+ RegistrationData* deleted_version,
std::vector<int64>* newly_purgeable_resources);
// Updates a registration for |registration_id| to an active state. Returns OK
@@ -155,7 +155,7 @@ class CONTENT_EXPORT ServiceWorkerDatabase {
// database. Otherwise, returns an error.
Status DeleteRegistration(int64 registration_id,
const GURL& origin,
- int64* version_id,
+ RegistrationData* deleted_version,
std::vector<int64>* newly_purgeable_resources);
// As new resources are put into the diskcache, they go into an uncommitted

Powered by Google App Engine
This is Rietveld 408576698