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

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

Issue 355163003: Don't prematurely delete script resources when registration is deleted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 df23dc3d61a55b913fa5ccd18ebc31219fe6581d..e8bce6c145cac9ed437e76bc2d5ce609ab4f2ce6 100644
--- a/content/browser/service_worker/service_worker_registration.h
+++ b/content/browser/service_worker/service_worker_registration.h
@@ -45,25 +45,25 @@ class CONTENT_EXPORT ServiceWorkerRegistration
const GURL& pattern() const { return pattern_; }
ServiceWorkerVersion* active_version() const {
- DCHECK(!is_shutdown_);
return active_version_.get();
}
ServiceWorkerVersion* waiting_version() const {
- DCHECK(!is_shutdown_);
return waiting_version_.get();
}
+ bool is_uninstalling() { return is_uninstalling_; }
+
void set_active_version(ServiceWorkerVersion* version) {
- DCHECK(!is_shutdown_);
active_version_ = version;
}
void set_waiting_version(ServiceWorkerVersion* version) {
- DCHECK(!is_shutdown_);
waiting_version_ = version;
}
+ void mark_as_uninstalling() { is_uninstalling_ = true; }
+
ServiceWorkerRegistrationInfo GetInfo();
// Returns the active version, if it is not null; otherwise, returns the
@@ -85,7 +85,7 @@ class CONTENT_EXPORT ServiceWorkerRegistration
scoped_refptr<ServiceWorkerVersion> active_version_;
scoped_refptr<ServiceWorkerVersion> waiting_version_;
- bool is_shutdown_;
+ bool is_uninstalling_;
base::WeakPtr<ServiceWorkerContextCore> context_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration);

Powered by Google App Engine
This is Rietveld 408576698