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

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

Issue 355163003: Don't prematurely delete script resources when registration is deleted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 6 years, 6 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
« no previous file with comments | « content/browser/service_worker/service_worker_version.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_version.cc
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index aa0d43ba87c30022eaca087a0acd8af9abdf7830..77abcf59aec7c9af92f1a79c0083fa2107cf1170 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -387,14 +387,10 @@ void ServiceWorkerVersion::RemoveControllee(
controllee_by_id_.Remove(found->second);
controllee_map_.erase(found);
RemoveProcessFromWorker(provider_host->process_id());
- if (!HasControllee())
+ if (!HasControllee()) {
ScheduleStopWorker();
- // TODO(kinuko): Fire NoControllees notification when the # of controllees
- // reaches 0, so that a new pending version can be activated (which will
- // deactivate this version).
- // TODO(michaeln): On no controllees call storage DeleteVersionResources
- // if this version has been deactivated. Probably storage can listen for
- // NoControllees for versions that have been deleted.
+ FOR_EACH_OBSERVER(Listener, listeners_, OnNoControllees(this));
+ }
}
void ServiceWorkerVersion::AddWaitingControllee(
« no previous file with comments | « content/browser/service_worker/service_worker_version.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698