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

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

Issue 417043006: ServiceWorker: Make SWProviderHost listen to SWRegistration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address michael's comments Created 6 years, 4 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_registration.h
diff --git a/content/browser/service_worker/service_worker_registration.h b/content/browser/service_worker/service_worker_registration.h
index 41092889e74c4396711d5d829d02a63bbfbf0645..d2dbd92b8c3d67c95b6c7d83edbced25eaec55e2 100644
--- a/content/browser/service_worker/service_worker_registration.h
+++ b/content/browser/service_worker/service_worker_registration.h
@@ -36,7 +36,9 @@ class CONTENT_EXPORT ServiceWorkerRegistration
virtual void OnVersionAttributesChanged(
ServiceWorkerRegistration* registration,
ChangedVersionAttributesMask changed_mask,
- const ServiceWorkerRegistrationInfo& info) = 0;
+ const ServiceWorkerRegistrationInfo& info) = 0;
+ virtual void OnRegistrationDeleted(
+ ServiceWorkerRegistration* registration) = 0;
};
ServiceWorkerRegistration(const GURL& pattern,
@@ -82,8 +84,10 @@ class CONTENT_EXPORT ServiceWorkerRegistration
// is called, activation is initiated immediately.
void ActivateWaitingVersionWhenReady();
+ // Sets |is_deleted_| and notify listeners via OnRegistrationDeleted.
+ void SetIsDeleted();
+
bool is_deleted() const { return is_deleted_; }
- void set_is_deleted() { is_deleted_ = true; }
private:
friend class base::RefCounted<ServiceWorkerRegistration>;

Powered by Google App Engine
This is Rietveld 408576698