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

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: Logic to Core 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 54eacd657f51bf4593d953a1f8bdf61a97cf6656..69c6448aef8566b09182ba2be5a226f45bd0ddf0 100644
--- a/content/browser/service_worker/service_worker_storage.cc
+++ b/content/browser/service_worker/service_worker_storage.cc
@@ -457,6 +457,16 @@ void ServiceWorkerStorage::StoreRegistration(
callback)));
registration->set_is_deleted(false);
+
+ // TODO(dmurph): Add correct byte delta.
+ if (quota_manager_proxy_.get() != nullptr) {
michaeln 2014/10/14 00:50:31 nit: don't need to comparison to nullptr
dmurph 2014/10/14 21:04:50 Done.
+ // 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