diff options
Diffstat (limited to 'content')
3 files changed, 20 insertions, 12 deletions
diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc index 4e99336..0243717 100644 --- a/content/browser/renderer_host/resource_dispatcher_host.cc +++ b/content/browser/renderer_host/resource_dispatcher_host.cc @@ -493,8 +493,8 @@ void ResourceDispatcherHost::BeginRequest( if (delegate_) { bool sub = request_data.resource_type != ResourceType::MAIN_FRAME; - handler = delegate_->RequestBeginning( - handler, request, sub, child_id, route_id); + handler = delegate_->RequestBeginning(handler, request, resource_context, + sub, child_id, route_id); } // Make extra info and read footer (contains request ID). @@ -710,8 +710,10 @@ void ResourceDispatcherHost::BeginDownload( prompt_for_save_location, save_info)); - if (delegate_) - handler = delegate_->DownloadStarting(handler, child_id, route_id); + if (delegate_) { + handler = delegate_->DownloadStarting(handler, context, child_id, + route_id); + } const net::URLRequestContext* request_context = context.request_context(); diff --git a/content/browser/renderer_host/resource_dispatcher_host_delegate.cc b/content/browser/renderer_host/resource_dispatcher_host_delegate.cc index 784dd42..65af22a 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_delegate.cc +++ b/content/browser/renderer_host/resource_dispatcher_host_delegate.cc @@ -21,6 +21,7 @@ bool ResourceDispatcherHostDelegate::ShouldBeginRequest( ResourceHandler* ResourceDispatcherHostDelegate::RequestBeginning( ResourceHandler* handler, net::URLRequest* request, + const content::ResourceContext& resource_context, bool is_subresource, int child_id, int route_id) { @@ -29,6 +30,7 @@ ResourceHandler* ResourceDispatcherHostDelegate::RequestBeginning( ResourceHandler* ResourceDispatcherHostDelegate::DownloadStarting( ResourceHandler* handler, + const content::ResourceContext& resource_context, int child_id, int route_id) { return handler; diff --git a/content/browser/renderer_host/resource_dispatcher_host_delegate.h b/content/browser/renderer_host/resource_dispatcher_host_delegate.h index 694d36c..cf60d03 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_delegate.h +++ b/content/browser/renderer_host/resource_dispatcher_host_delegate.h @@ -42,17 +42,21 @@ class ResourceDispatcherHostDelegate { // content layer have been added. To add new handlers to the front, return // a new handler that is chained to the given one, otherwise just reutrn the // given handler. - virtual ResourceHandler* RequestBeginning(ResourceHandler* handler, - net::URLRequest* request, - bool is_subresource, - int child_id, - int route_id); + virtual ResourceHandler* RequestBeginning( + ResourceHandler* handler, + net::URLRequest* request, + const content::ResourceContext& resource_context, + bool is_subresource, + int child_id, + int route_id); // Called when a download is starting, after the resource handles from the // content layer have been added. - virtual ResourceHandler* DownloadStarting(ResourceHandler* handler, - int child_id, - int route_id); + virtual ResourceHandler* DownloadStarting( + ResourceHandler* handler, + const content::ResourceContext& resource_context, + int child_id, + int route_id); // Called to determine whether a request's start should be deferred. This // is only called if the ResourceHandler associated with the request does |