Chromium Code Reviews| Index: content/browser/service_worker/service_worker_version.h |
| diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h |
| index ef267112f83f15932416276a09f650c3d7924f25..c747c0c34f763888d465e99c4a3f4cf3046c977a 100644 |
| --- a/content/browser/service_worker/service_worker_version.h |
| +++ b/content/browser/service_worker/service_worker_version.h |
| @@ -304,6 +304,13 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| return controllee_map_; |
| } |
| + // The provider host hosting this version. Only valid while the version is |
| + // running. |
| + ServiceWorkerProviderHost* provider_host() { |
| + DCHECK(provider_host_); |
| + return provider_host_.get(); |
| + } |
| + |
| base::WeakPtr<ServiceWorkerContextCore> context() const { return context_; } |
| // Adds and removes |request_job| as a dependent job not to stop the |
| @@ -733,6 +740,11 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| std::set<const ServiceWorkerURLRequestJob*> streaming_url_request_jobs_; |
| + // Keeps track of the provider hosting this running service worker for this |
| + // version. |provider_host_| is always valid as long as this version has |
| + // the running context. |
|
falken
2017/06/20 04:59:35
s/has the running context/is running
shimazu
2017/06/21 03:11:27
Done.
|
| + base::WeakPtr<ServiceWorkerProviderHost> provider_host_; |
| + |
| std::map<std::string, ServiceWorkerProviderHost*> controllee_map_; |
| // Will be null while shutting down. |
| base::WeakPtr<ServiceWorkerContextCore> context_; |