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

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: Removed unnecessary IO thread switch 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 69e48f37ab2b678e670eebb4bdb9bf23615cc519..2a4cbe64a632e458cd3c1abd001ed8bee1e5986b 100644
--- a/content/browser/service_worker/service_worker_storage.cc
+++ b/content/browser/service_worker/service_worker_storage.cc
@@ -474,6 +474,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(

Powered by Google App Engine
This is Rietveld 408576698