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

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

Issue 413063004: Service Worker: in Unregister, wait until after the active worker no longer controls a document (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: delete/restore from storage Created 6 years, 5 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.h
diff --git a/content/browser/service_worker/service_worker_storage.h b/content/browser/service_worker/service_worker_storage.h
index 03c5e0f4a041bee5f9b0be760c4a67d112d77ede..f769f1f6fb0ac369a92cd853ebeb9fc798d3caef 100644
--- a/content/browser/service_worker/service_worker_storage.h
+++ b/content/browser/service_worker/service_worker_storage.h
@@ -87,6 +87,9 @@ class CONTENT_EXPORT ServiceWorkerStorage
const GURL& origin,
const FindRegistrationCallback& callback);
+ scoped_refptr<ServiceWorkerRegistration> GetUninstallingRegistration(
+ const GURL& scope);
+
// Returns info about all stored and initially installing registrations.
void GetAllRegistrations(const GetAllRegistrationInfosCallback& callback);
@@ -143,6 +146,10 @@ class CONTENT_EXPORT ServiceWorkerStorage
ServiceWorkerRegistration* registration,
ServiceWorkerVersion* version,
ServiceWorkerStatusCode status);
+ // Intended for use only by ServiceWorkerRegistration.
+ void NotifyUninstallingRegistration(ServiceWorkerRegistration* registration);
+ void NotifyDoneUninstallingRegistration(
+ ServiceWorkerRegistration* registration);
void Disable();
bool IsDisabled() const;
@@ -321,8 +328,9 @@ class CONTENT_EXPORT ServiceWorkerStorage
const StatusCallback& callback,
bool result);
- // For finding registrations being installed.
+ // For finding registrations being installed or uninstalled.
RegistrationRefsById installing_registrations_;
+ RegistrationRefsById uninstalling_registrations_;
// Origins having registations.
std::set<GURL> registered_origins_;

Powered by Google App Engine
This is Rietveld 408576698