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

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

Issue 7624031: Treat files downloaded from the address bar as "always safe" (including extensions per discussion... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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.cc
===================================================================
--- content/browser/renderer_host/resource_dispatcher_host.cc (revision 98485)
+++ content/browser/renderer_host/resource_dispatcher_host.cc (working copy)
@@ -589,6 +589,7 @@
request_data.is_main_frame,
request_data.frame_id,
request_data.resource_type,
+ request_data.transition_type,
upload_size,
false, // is download
ResourceType::IsFrame(request_data.resource_type), // allow_download
@@ -730,8 +731,7 @@
new_first_party_for_cookies);
}
-ResourceDispatcherHostRequestInfo*
-ResourceDispatcherHost::CreateRequestInfoForBrowserRequest(
+ResourceDispatcherHostRequestInfo* ResourceDispatcherHost::CreateRequestInfo(
ResourceHandler* handler,
int child_id,
int route_id,
@@ -746,6 +746,7 @@
false, // is_main_frame
-1, // frame_id
ResourceType::SUB_RESOURCE,
+ PageTransition::LINK,
0, // upload_size
download, // is_download
download, // allow_download
@@ -840,8 +841,7 @@
net::LOAD_IS_DOWNLOAD);
ResourceDispatcherHostRequestInfo* extra_info =
- CreateRequestInfoForBrowserRequest(
- handler, child_id, route_id, true, context);
+ CreateRequestInfo(handler, child_id, route_id, true, context);
SetRequestInfo(request, extra_info); // Request takes ownership.
BeginRequestInternal(request);
@@ -885,8 +885,7 @@
// Since we're just saving some resources we need, disallow downloading.
ResourceDispatcherHostRequestInfo* extra_info =
- CreateRequestInfoForBrowserRequest(
- handler, child_id, route_id, false, context);
+ CreateRequestInfo(handler, child_id, route_id, false, context);
SetRequestInfo(request, extra_info); // Request takes ownership.
BeginRequestInternal(request);

Powered by Google App Engine
This is Rietveld 408576698