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 2467ba6a72befc017f2d7441595ec6e9bb988ec2..5cc612c831a68d117cae3d289fbf19f43a8355ef 100644 |
--- a/content/browser/service_worker/service_worker_context_core.h |
+++ b/content/browser/service_worker/service_worker_context_core.h |
@@ -11,6 +11,7 @@ |
#include "base/callback.h" |
#include "base/files/file_path.h" |
#include "base/id_map.h" |
+#include "base/memory/linked_ptr.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
#include "base/observer_list_threadsafe.h" |
@@ -159,6 +160,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); |
+ // 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. |
nasko
2015/10/02 22:09:45
nit: This comment is an implementation detail that
Fabrice (no longer in Chrome)
2015/10/06 17:21:38
Done.
|
+ 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 |
@@ -290,6 +302,12 @@ 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, linked_ptr<ServiceWorkerProviderHost>> |
+ navigation_provider_host_map_; |
+ |
int next_handle_id_; |
int next_registration_handle_id_; |
// Set in RegisterServiceWorker(), cleared in ClearAllServiceWorkersForTest(). |