| Index: content/browser/service_worker/service_worker_context_wrapper.h
|
| diff --git a/content/browser/service_worker/service_worker_context_wrapper.h b/content/browser/service_worker/service_worker_context_wrapper.h
|
| index 12c8b7220cd833464c774c76357a7bb6408573c5..b8dfb1e3733edcee9ad09e3ec9d121bbb41fcaad 100644
|
| --- a/content/browser/service_worker/service_worker_context_wrapper.h
|
| +++ b/content/browser/service_worker/service_worker_context_wrapper.h
|
| @@ -112,6 +112,8 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
|
| blink::WebNavigationHintType type,
|
| int render_process_id,
|
| const ResultCallback& callback) override;
|
| + bool IncrementPendingActivity(int64_t service_worker_version_id) override;
|
| + bool DecrementPendingActivity(int64_t service_worker_version_id) override;
|
|
|
| // These methods must only be called from the IO thread.
|
| ServiceWorkerRegistration* GetLiveRegistration(int64_t registration_id);
|
| @@ -196,6 +198,7 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
|
| friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>;
|
| friend class EmbeddedWorkerTestHelper;
|
| friend class EmbeddedWorkerBrowserTest;
|
| + friend class ServiceWorkerContext;
|
| friend class ServiceWorkerDispatcherHost;
|
| friend class ServiceWorkerInternalsUI;
|
| friend class ServiceWorkerNavigationHandleCore;
|
| @@ -256,6 +259,9 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
|
| const ResultCallback& callback,
|
| bool result);
|
|
|
| + void ExternalRequestErrorCallback(int64_t service_worker_version_id,
|
| + ServiceWorkerStatusCode status);
|
| +
|
| // The core context is only for use on the IO thread.
|
| // Can be null before/during init, during/after shutdown, and after
|
| // DeleteAndStartOver fails.
|
| @@ -279,6 +285,11 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
|
| // Must be touched on the UI thread.
|
| std::map<int, int> navigation_hint_task_count_per_process_;
|
|
|
| + // Maps service worker version id -> list of pending request ids in the order
|
| + // they arrive.
|
| + // IO thread.
|
| + std::map<int64_t, std::queue<int>> pending_external_requests_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper);
|
| };
|
|
|
|
|