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

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

Issue 563923005: ServiceWorker: SWProviderHost no longer have to retain SWVersions (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | content/browser/service_worker/service_worker_provider_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_provider_host.h
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h
index 4662ddd4a9d46de812df0d8cf933b3cb24bc8fe7..319b0d93a07c6701d66fc76bbc98d8f1f6c8259b 100644
--- a/content/browser/service_worker/service_worker_provider_host.h
+++ b/content/browser/service_worker/service_worker_provider_host.h
@@ -56,18 +56,20 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
return running_hosted_version_.get() != NULL;
}
- // Getters for the navigator.serviceWorker attribute values.
ServiceWorkerVersion* controlling_version() const {
return controlling_version_.get();
}
ServiceWorkerVersion* active_version() const {
- return active_version_.get();
+ return associated_registration_.get() ?
+ associated_registration_->active_version() : NULL;
}
ServiceWorkerVersion* waiting_version() const {
- return waiting_version_.get();
+ return associated_registration_.get() ?
+ associated_registration_->waiting_version() : NULL;
}
ServiceWorkerVersion* installing_version() const {
- return installing_version_.get();
+ return associated_registration_.get() ?
+ associated_registration_->installing_version() : NULL;
}
// The running version, if any, that this provider is providing resource
@@ -124,10 +126,6 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
UpdateAfter24Hours);
// ServiceWorkerRegistration::Listener overrides.
- virtual void OnVersionAttributesChanged(
- ServiceWorkerRegistration* registration,
- ChangedVersionAttributesMask changed_mask,
- const ServiceWorkerRegistrationInfo& info) OVERRIDE;
virtual void OnRegistrationFailed(
ServiceWorkerRegistration* registration) OVERRIDE;
@@ -152,9 +150,6 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
scoped_refptr<ServiceWorkerRegistration> associated_registration_;
scoped_refptr<ServiceWorkerVersion> controlling_version_;
- scoped_refptr<ServiceWorkerVersion> active_version_;
- scoped_refptr<ServiceWorkerVersion> waiting_version_;
- scoped_refptr<ServiceWorkerVersion> installing_version_;
scoped_refptr<ServiceWorkerVersion> running_hosted_version_;
base::WeakPtr<ServiceWorkerContextCore> context_;
ServiceWorkerDispatcherHost* dispatcher_host_;
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_provider_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698