diff options
Diffstat (limited to 'content/browser')
5 files changed, 10 insertions, 2 deletions
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc index dc655bf..cf9ae3a 100644 --- a/content/browser/download/download_manager_impl.cc +++ b/content/browser/download/download_manager_impl.cc @@ -83,6 +83,7 @@ void BeginDownload(content::DownloadUrlParameters* params) { } resource_dispatcher_host->BeginDownload( request.Pass(), + params->content_initiated(), params->resource_context(), params->render_process_host_id(), params->render_view_host_routing_id(), diff --git a/content/browser/renderer_host/buffered_resource_handler.cc b/content/browser/renderer_host/buffered_resource_handler.cc index 23e2e7b..7cd8aed 100644 --- a/content/browser/renderer_host/buffered_resource_handler.cc +++ b/content/browser/renderer_host/buffered_resource_handler.cc @@ -300,6 +300,7 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id) { info->GetChildID(), info->GetRouteID(), info->GetRequestID(), + true, // is_content_initiated DownloadSaveInfo(), DownloadResourceHandler::OnStartedCallback())); diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index 783de11..7908f34 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -723,6 +723,7 @@ void RenderMessageFilter::OnDownloadUrl(const IPC::Message& message, download_stats::RecordDownloadSource(download_stats::INITIATED_BY_RENDERER); resource_dispatcher_host_->BeginDownload( request.Pass(), + true, // is_content_initiated resource_context_, render_process_id_, message.routing_id(), diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.cc b/content/browser/renderer_host/resource_dispatcher_host_impl.cc index 45b3092..ce87cd6 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_impl.cc +++ b/content/browser/renderer_host/resource_dispatcher_host_impl.cc @@ -465,6 +465,7 @@ void ResourceDispatcherHostImpl::CancelRequestsForContext( net::Error ResourceDispatcherHostImpl::BeginDownload( scoped_ptr<net::URLRequest> request, + bool is_content_initiated, ResourceContext* context, int child_id, int route_id, @@ -513,7 +514,8 @@ net::Error ResourceDispatcherHostImpl::BeginDownload( // |started_callback|. scoped_refptr<ResourceHandler> handler( CreateResourceHandlerForDownload(request.get(), context, child_id, - route_id, request_id_, save_info, + route_id, request_id_, + is_content_initiated, save_info, started_callback)); if (!request_context->job_factory()->IsHandledURL(url)) { @@ -575,6 +577,7 @@ ResourceDispatcherHostImpl::CreateResourceHandlerForDownload( int child_id, int route_id, int request_id, + bool is_content_initiated, const DownloadSaveInfo& save_info, const DownloadResourceHandler::OnStartedCallback& started_cb) { scoped_refptr<ResourceHandler> handler( @@ -584,7 +587,7 @@ ResourceDispatcherHostImpl::CreateResourceHandlerForDownload( if (delegate_) { ScopedVector<ResourceThrottle> throttles; delegate_->DownloadStarting(request, context, child_id, route_id, - request_id, !request->is_pending(), &throttles); + request_id, is_content_initiated, &throttles); if (!throttles.empty()) { handler = new ThrottlingResourceHandler(this, handler, child_id, request_id, throttles.Pass()); diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.h b/content/browser/renderer_host/resource_dispatcher_host_impl.h index c306c46..463fffa 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_impl.h +++ b/content/browser/renderer_host/resource_dispatcher_host_impl.h @@ -76,6 +76,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl virtual void SetAllowCrossOriginAuthPrompt(bool value) OVERRIDE; virtual net::Error BeginDownload( scoped_ptr<net::URLRequest> request, + bool is_content_initiated, ResourceContext* context, int child_id, int route_id, @@ -252,6 +253,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl int child_id, int route_id, int request_id, + bool is_content_initiated, const DownloadSaveInfo& save_info, const DownloadResourceHandler::OnStartedCallback& started_cb); |