Chromium Code Reviews| Index: content/browser/service_worker/service_worker_context_core.h |
| diff --git a/content/browser/service_worker/service_worker_context_core.h b/content/browser/service_worker/service_worker_context_core.h |
| index 3cc735fc38913331d22f262369cfcc9f5b6ddaa1..9fca17a3122fce1f3f145ee157664a15558390c0 100644 |
| --- a/content/browser/service_worker/service_worker_context_core.h |
| +++ b/content/browser/service_worker/service_worker_context_core.h |
| @@ -159,6 +159,17 @@ class CONTENT_EXPORT ServiceWorkerContextCore |
| scoped_ptr<ProviderHostIterator> GetClientProviderHostIterator( |
| const GURL& origin); |
| + // PlzNavigate |
| + // Methods to manage the list of ProviderHosts for navigation requests. |
| + void AddNavigationProviderHost( |
| + scoped_ptr<ServiceWorkerProviderHost> provider_host); |
|
michaeln
2015/10/01 23:11:12
passing a scoped_ptr here is misleading because th
Fabrice (no longer in Chrome)
2015/10/02 16:37:34
I changed the implementation to use a linked_ptr i
|
| + // Returns an emptry scoped_ptr if the ProviderHost with id |provider_id| is |
| + // not present. |
| + scoped_ptr<ServiceWorkerProviderHost> TakeNavigationProviderHost( |
| + int provider_id); |
| + // Noop if the ProviderHost with id |provider_id| is not present. |
| + void RemoveNavigationProviderHost(int provider_id); |
| + |
| // Maintains a map from Client UUID to ProviderHost. |
| // (Note: instead of maintaining 2 maps we might be able to uniformly use |
| // UUID instead of process_id+provider_id elsewhere. For now I'm leaving |
| @@ -289,6 +300,11 @@ class CONTENT_EXPORT ServiceWorkerContextCore |
| std::map<int64, ServiceWorkerRegistration*> live_registrations_; |
| std::map<int64, ServiceWorkerVersion*> live_versions_; |
| std::map<int64, scoped_refptr<ServiceWorkerVersion>> protected_versions_; |
| + |
| + // PlzNavigate |
| + // Map of ServiceWorkerProviderHost used for navigation requests. |
| + std::map<int, ServiceWorkerProviderHost*> navigation_provider_host_map_; |
| + |
| int next_handle_id_; |
| int next_registration_handle_id_; |
| // Set in RegisterServiceWorker(), cleared in ClearAllServiceWorkersForTest(). |