Index: content/browser/loader/resource_dispatcher_host_impl.h |
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h |
index 3d92dab8387bc29aeb0b14010c2b4b05dee1ec35..5d02f1d3ceac904e1011da5ae0b0d1cf06953064 100644 |
--- a/content/browser/loader/resource_dispatcher_host_impl.h |
+++ b/content/browser/loader/resource_dispatcher_host_impl.h |
@@ -65,7 +65,7 @@ class ResourceDispatcherHostDelegate; |
class ResourceLoader; |
class ResourceHandler; |
class ResourceMessageDelegate; |
-class ResourceMessageFilter; |
+class ResourceRequesterInfo; |
class ResourceRequestInfoImpl; |
class ResourceScheduler; |
class ServiceWorkerNavigationHandleCore; |
@@ -135,7 +135,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
// Returns true if the message was a resource message that was processed. |
bool OnMessageReceived(const IPC::Message& message, |
- ResourceMessageFilter* filter); |
+ ResourceRequesterInfo* requester_info); |
// Cancels the given request if it still exists. |
void CancelRequest(int child_id, int request_id); |
@@ -295,17 +295,17 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
// Called when loading a request with mojo. |
void OnRequestResourceWithMojo( |
+ ResourceRequesterInfo* requester_info, |
int routing_id, |
int request_id, |
const ResourceRequest& request, |
mojom::URLLoaderAssociatedRequest mojo_request, |
- mojom::URLLoaderClientAssociatedPtr url_loader_client, |
- ResourceMessageFilter* filter); |
+ mojom::URLLoaderClientAssociatedPtr url_loader_client); |
- void OnSyncLoadWithMojo(int routing_id, |
+ void OnSyncLoadWithMojo(ResourceRequesterInfo* requester_info, |
+ int routing_id, |
int request_id, |
const ResourceRequest& request_data, |
- ResourceMessageFilter* filter, |
const SyncLoadResultCallback& result_handler); |
// Helper function for initializing the |request| passed in. By initializing |
@@ -525,18 +525,21 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
const GlobalFrameRoutingId& global_routing_id, |
bool cancel_requests); |
- void OnRequestResource(int routing_id, |
+ void OnRequestResource(ResourceRequesterInfo* requester_info, |
+ int routing_id, |
int request_id, |
const ResourceRequest& request_data); |
void OnRequestResourceInternal( |
+ ResourceRequesterInfo* requester_info, |
int routing_id, |
int request_id, |
const ResourceRequest& request_data, |
mojom::URLLoaderAssociatedRequest mojo_request, |
mojom::URLLoaderClientAssociatedPtr url_loader_client); |
- void OnSyncLoad(int request_id, |
+ void OnSyncLoad(ResourceRequesterInfo* requester_info, |
+ int request_id, |
const ResourceRequest& request_data, |
IPC::Message* sync_result); |
@@ -545,7 +548,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
// Update the ResourceRequestInfo and internal maps when a request is |
// transferred from one process to another. |
void UpdateRequestForTransfer( |
- int child_id, |
+ ResourceRequesterInfo* requester_info, |
int route_id, |
int request_id, |
const ResourceRequest& request_data, |
@@ -555,13 +558,15 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
// If |request_data| is for a request being transferred from another process, |
// then CompleteTransfer method can be used to complete the transfer. |
- void CompleteTransfer(int request_id, |
+ void CompleteTransfer(ResourceRequesterInfo* requester_info, |
+ int request_id, |
const ResourceRequest& request_data, |
int route_id, |
mojom::URLLoaderAssociatedRequest mojo_request, |
mojom::URLLoaderClientAssociatedPtr url_loader_client); |
void BeginRequest( |
+ ResourceRequesterInfo* requester_info, |
int request_id, |
const ResourceRequest& request_data, |
const SyncLoadResultCallback& sync_result_handler, // only valid for sync |
@@ -579,6 +584,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
// request should be continued or aborted. The |error_code| parameter is set |
// if |continue_request| is false. |
void ContinuePendingBeginRequest( |
+ scoped_refptr<ResourceRequesterInfo> requester_info, |
int request_id, |
const ResourceRequest& request_data, |
const SyncLoadResultCallback& sync_result_handler, // only valid for sync |
@@ -592,11 +598,11 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
// Creates a ResourceHandler to be used by BeginRequest() for normal resource |
// loading. |
std::unique_ptr<ResourceHandler> CreateResourceHandler( |
+ ResourceRequesterInfo* requester_info, |
net::URLRequest* request, |
const ResourceRequest& request_data, |
const SyncLoadResultCallback& sync_result_handler, |
int route_id, |
- int process_type, |
int child_id, |
ResourceContext* resource_context, |
mojom::URLLoaderAssociatedRequest mojo_request, |
@@ -615,9 +621,11 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
int route_id, |
std::unique_ptr<ResourceHandler> handler); |
- void OnCancelRequest(int request_id); |
- void OnReleaseDownloadedFile(int request_id); |
- void OnDidChangePriority(int request_id, |
+ void OnCancelRequest(ResourceRequesterInfo* requester_info, int request_id); |
+ void OnReleaseDownloadedFile(ResourceRequesterInfo* requester_info, |
+ int request_id); |
+ void OnDidChangePriority(ResourceRequesterInfo* requester_info, |
+ int request_id, |
net::RequestPriority new_priority, |
int intra_priority_value); |
@@ -660,18 +668,16 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
ResourceMessageDelegate* delegate); |
int BuildLoadFlagsForRequest(const ResourceRequest& request_data, |
- int child_id, |
bool is_sync_load); |
// Consults the RendererSecurity policy to determine whether the |
// ResourceDispatcherHostImpl should service this request. A request might |
// be disallowed if the renderer is not authorized to retrieve the request |
// URL or if the renderer is attempting to upload an unauthorized file. |
- bool ShouldServiceRequest(int process_type, |
- int child_id, |
+ bool ShouldServiceRequest(int child_id, |
const ResourceRequest& request_data, |
const net::HttpRequestHeaders& headers, |
- ResourceMessageFilter* filter, |
+ ResourceRequesterInfo* requester_info, |
ResourceContext* resource_context); |
// Notifies the ResourceDispatcherHostDelegate about a download having |
@@ -753,10 +759,6 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl |
// may be because of explicit user action. |
base::TimeTicks last_user_gesture_time_; |
- // Used during IPC message dispatching so that the handlers can get a pointer |
- // to the source of the message. |
- ResourceMessageFilter* filter_; |
- |
ResourceDispatcherHostDelegate* delegate_; |
LoaderDelegate* loader_delegate_; |