Index: content/browser/loader/sync_resource_handler.cc |
diff --git a/content/browser/loader/sync_resource_handler.cc b/content/browser/loader/sync_resource_handler.cc |
index 1310d0f36691e2d383e292d3ac08f7c114017b4c..8a830951aa3cedf1fbd1339c456acbb3b06cae3b 100644 |
--- a/content/browser/loader/sync_resource_handler.cc |
+++ b/content/browser/loader/sync_resource_handler.cc |
@@ -83,6 +83,14 @@ bool SyncResourceHandler::OnResponseStarted( |
DevToolsNetLogObserver::PopulateResponseInfo(request(), response); |
+ // If the parent handler downloaded the resource to a file, grant the child |
+ // read permissions on it. |
+ if (!response->head.download_file_path.empty()) { |
+ rdh_->RegisterDownloadedTempFile( |
+ info->GetChildID(), info->GetRequestID(), |
+ response->head.download_file_path); |
+ } |
+ |
// We don't care about copying the status here. |
result_.headers = response->head.headers; |
result_.mime_type = response->head.mime_type; |