Chromium Code Reviews

Unified Diff: content/browser/loader/async_resource_handler.cc

Issue 82273002: Fix various issues in RedirectToFileResourceHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename test fixture Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | content/browser/loader/redirect_to_file_resource_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/async_resource_handler.cc
diff --git a/content/browser/loader/async_resource_handler.cc b/content/browser/loader/async_resource_handler.cc
index 5326b667106dbf01b09a3dcaf8d9a5c3a5fe953f..7014a47fae6f0badfb1429ea3306a3b20a7fb768 100644
--- a/content/browser/loader/async_resource_handler.cc
+++ b/content/browser/loader/async_resource_handler.cc
@@ -200,6 +200,15 @@ bool AsyncResourceHandler::OnResponseStarted(int request_id,
net::GetHostOrSpecFromURL(request_url))));
}
+ // If the parent handler downloaded the resource to a file, grant the child
+ // read permissions on it. Note: there is similar logic in
+ // SyncResourceHandler.
+ if (!response->head.download_file_path.empty()) {
+ rdh_->RegisterDownloadedTempFile(
+ info->GetChildID(), info->GetRequestID(),
+ response->head.download_file_path);
+ }
+
response->head.request_start = request()->creation_time();
response->head.response_start = TimeTicks::Now();
info->filter()->Send(new ResourceMsg_ReceivedResponse(request_id,
« no previous file with comments | « no previous file | content/browser/loader/redirect_to_file_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine