Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: content/browser/renderer_host/resource_dispatcher_host_impl.cc

Issue 10381122: Add flag to specify if explicitly requested download is from web. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR and integrated into DownloadUrlParams. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/resource_dispatcher_host_impl.cc
diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.cc b/content/browser/renderer_host/resource_dispatcher_host_impl.cc
index 45b3092e2fdb1e64c1ecbbd688ef96cd8f7c8786..ce87cd6d8aadf653db8588738235443549973422 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());
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host_impl.h ('k') | content/public/browser/download_url_parameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698