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

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: Rebase, address mmenke comments. Created 6 years, 11 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/loader/async_resource_handler.cc
diff --git a/content/browser/loader/async_resource_handler.cc b/content/browser/loader/async_resource_handler.cc
index 52c1d8fd251d089c57fd2f37405afd89f688ea32..94628c7dc6db7fc9062f48a6c30616d76dad3038 100644
--- a/content/browser/loader/async_resource_handler.cc
+++ b/content/browser/loader/async_resource_handler.cc
@@ -197,6 +197,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,

Powered by Google App Engine
This is Rietveld 408576698