Chromium Code Reviews| Index: content/browser/loader/resource_request_info_impl.h |
| diff --git a/content/browser/loader/resource_request_info_impl.h b/content/browser/loader/resource_request_info_impl.h |
| index 356efa4cf8a0bf1d52944c9f15393d0a551f72ee..27963417834b0fe751517110b8978c00cda35f04 100644 |
| --- a/content/browser/loader/resource_request_info_impl.h |
| +++ b/content/browser/loader/resource_request_info_impl.h |
| @@ -13,6 +13,7 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/supports_user_data.h" |
| +#include "content/browser/service_worker/service_worker_context_wrapper.h" |
| #include "content/common/resource_request_body_impl.h" |
| #include "content/public/browser/navigation_ui_data.h" |
| #include "content/public/browser/resource_request_info.h" |
| @@ -205,6 +206,17 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, |
| navigation_ui_data_ = std::move(navigation_ui_data); |
| } |
| + // PlzNavigate: used in navigations to store the ServiceWorkerContext, since |
| + // the ResourceMessageFilter will be null in this case. All other requests |
| + // should access the ServiceWorkerContext through the ResourceMessageFilter. |
| + void set_service_worker_context( |
| + ServiceWorkerContextWrapper* service_worker_context) { |
|
falken
2016/10/07 03:49:32
nit: in modern Chromium style this should be a sco
clamy
2016/10/07 10:01:52
Done.
|
| + service_worker_context_ = service_worker_context; |
| + } |
| + ServiceWorkerContextWrapper* service_worker_context() const { |
| + return service_worker_context_.get(); |
| + } |
| + |
| private: |
| FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| DeletedFilterDetached); |
| @@ -249,6 +261,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, |
| scoped_refptr<ResourceRequestBodyImpl> body_; |
| bool initiated_in_secure_context_; |
| std::unique_ptr<NavigationUIData> navigation_ui_data_; |
| + scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; |
| DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
| }; |