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 615954a807ea06b3a1c671c4995b59b83e33f7c6..7f2932811fd45db620e084810198ccbf0567847d 100644 |
| --- a/content/browser/service_worker/service_worker_context_core.h |
| +++ b/content/browser/service_worker/service_worker_context_core.h |
| @@ -68,6 +68,9 @@ class CONTENT_EXPORT ServiceWorkerContextCore |
| typedef IDMap<ServiceWorkerProviderHost, IDMapOwnPointer> ProviderMap; |
| typedef IDMap<ProviderMap, IDMapOwnPointer> ProcessToProviderMap; |
| + using ProviderByClientUUIDMap = |
| + std::map<std::string, ServiceWorkerProviderHost*>; |
| + |
| // Directory for ServiceWorkerStorage and ServiceWorkerCacheManager. |
| static const base::FilePath::CharType kServiceWorkerDirectory[]; |
| @@ -147,6 +150,15 @@ class CONTENT_EXPORT ServiceWorkerContextCore |
| void RemoveAllProviderHostsForProcess(int process_id); |
| scoped_ptr<ProviderHostIterator> GetProviderHostIterator(); |
| + // Maintains a map from Client UUID to ProviderHost. |
| + // (Note: instead of maintaining 2 maps we could uniformly use UUID |
| + // instead of process_id+provider_id elsewhere. Not a to-do, but might |
| + // be nice to do.) |
| + void RegisterClientIDForProviderHost( |
| + const std::string& client_uuid, |
| + ServiceWorkerProviderHost* provider_host); |
|
nhiroki
2015/03/12 00:29:24
nit: indent
kinuko
2015/03/12 01:06:59
Done.
|
| + void UnregisterClientIDForProviderHost(const std::string& client_uuid); |
| + |
| // A child process of |source_process_id| may be used to run the created |
| // worker for initial installation. |
| // Non-null |provider_host| must be given if this is called from a document. |
| @@ -232,6 +244,7 @@ class CONTENT_EXPORT ServiceWorkerContextCore |
| // Bind() to hold a reference to |wrapper_| until |this| is fully destroyed. |
| ServiceWorkerContextWrapper* wrapper_; |
| scoped_ptr<ProcessToProviderMap> providers_; |
| + scoped_ptr<ProviderByClientUUIDMap> provider_by_uuid_; |
| scoped_ptr<ServiceWorkerStorage> storage_; |
| scoped_ptr<ServiceWorkerCacheStorageManager> cache_manager_; |
| scoped_refptr<EmbeddedWorkerRegistry> embedded_worker_registry_; |