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

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

Issue 633273002: Added quota client for serviceworker. Enables 'clear past <time> data'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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_storage.cc
diff --git a/content/browser/service_worker/service_worker_storage.cc b/content/browser/service_worker/service_worker_storage.cc
index da891db4a47f8850bfc4dd9b555de6992b680f14..82fd457dc56c653f571012cac4ae56fd8412cd23 100644
--- a/content/browser/service_worker/service_worker_storage.cc
+++ b/content/browser/service_worker/service_worker_storage.cc
@@ -479,6 +479,16 @@ void ServiceWorkerStorage::StoreRegistration(
callback)));
registration->set_is_deleted(false);
+
+ // TODO(dmurph): Add correct byte delta.
+ if (quota_manager_proxy_.get()) {
+ // Can be nullptr in tests.
+ quota_manager_proxy_->NotifyStorageModified(
+ storage::QuotaClient::kServiceWorker,
+ registration->pattern().GetOrigin(),
+ storage::StorageType::kStorageTypeTemporary,
+ 0);
+ }
}
void ServiceWorkerStorage::UpdateToActiveState(
« no previous file with comments | « content/browser/service_worker/service_worker_quota_client.cc ('k') | content/browser/storage_partition_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698