| 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 97cc7198960a0a171c24e5a3992d115a2405be8a..f82eb9439b779b469b4a8ac857646d363f05a6c7 100644
|
| --- a/content/browser/loader/resource_request_info_impl.h
|
| +++ b/content/browser/loader/resource_request_info_impl.h
|
| @@ -14,7 +14,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/browser/loader/resource_requester_info.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"
|
| @@ -43,8 +43,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
|
| const net::URLRequest* request);
|
|
|
| CONTENT_EXPORT ResourceRequestInfoImpl(
|
| - int process_type,
|
| - int child_id,
|
| + scoped_refptr<const ResourceRequesterInfo> requester_info,
|
| int route_id,
|
| int frame_tree_node_id,
|
| int origin_pid,
|
| @@ -65,7 +64,6 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
|
| blink::WebReferrerPolicy referrer_policy,
|
| blink::WebPageVisibilityState visibility_state,
|
| ResourceContext* context,
|
| - base::WeakPtr<ResourceMessageFilter> filter,
|
| bool report_raw_headers,
|
| bool is_async,
|
| bool is_using_lofi,
|
| @@ -110,21 +108,19 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
|
| // request).
|
| int frame_tree_node_id() const { return frame_tree_node_id_; }
|
|
|
| - // May be NULL (e.g., if process dies during a transfer).
|
| - ResourceMessageFilter* filter() const {
|
| - return filter_.get();
|
| + const ResourceRequesterInfo& requester_info() const {
|
| + return *requester_info_;
|
| }
|
|
|
| // Updates the data associated with this request after it is is transferred
|
| // to a new renderer process. Not all data will change during a transfer.
|
| // We do not expect the ResourceContext to change during navigation, so that
|
| // does not need to be updated.
|
| - void UpdateForTransfer(int child_id,
|
| - int route_id,
|
| + void UpdateForTransfer(int route_id,
|
| int render_frame_id,
|
| int origin_pid,
|
| int request_id,
|
| - base::WeakPtr<ResourceMessageFilter> filter);
|
| + const ResourceRequesterInfo* requester_info);
|
|
|
| // Whether this request is part of a navigation that should replace the
|
| // current session history entry. This state is shuffled up and down the stack
|
| @@ -141,9 +137,6 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
|
| detachable_handler_ = h;
|
| }
|
|
|
| - // Identifies the type of process (renderer, plugin, etc.) making the request.
|
| - int process_type() const { return process_type_; }
|
| -
|
| // Downloads are allowed only as a top level request.
|
| bool allow_download() const { return allow_download_; }
|
|
|
| @@ -198,17 +191,6 @@ 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(
|
| - scoped_refptr<ServiceWorkerContextWrapper> service_worker_context) {
|
| - service_worker_context_ = service_worker_context;
|
| - }
|
| - ServiceWorkerContextWrapper* service_worker_context() const {
|
| - return service_worker_context_.get();
|
| - }
|
| -
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
|
| DeletedFilterDetached);
|
| @@ -217,8 +199,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
|
| // Non-owning, may be NULL.
|
| DetachableResourceHandler* detachable_handler_;
|
|
|
| - int process_type_;
|
| - int child_id_;
|
| + scoped_refptr<const ResourceRequesterInfo> requester_info_;
|
| int route_id_;
|
| const int frame_tree_node_id_;
|
| int origin_pid_;
|
| @@ -242,9 +223,6 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
|
| blink::WebReferrerPolicy referrer_policy_;
|
| blink::WebPageVisibilityState visibility_state_;
|
| ResourceContext* context_;
|
| - // The filter might be deleted without deleting this object if the process
|
| - // exits during a transfer.
|
| - base::WeakPtr<ResourceMessageFilter> filter_;
|
| bool report_raw_headers_;
|
| bool is_async_;
|
| bool is_using_lofi_;
|
| @@ -252,7 +230,6 @@ 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);
|
| };
|
|
|