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

Unified Diff: chrome/browser/renderer_host/download_resource_handler.cc

Issue 3347018: GTTF: Clean up DownloadFileManager (Closed)
Patch Set: shutdowns Created 10 years, 3 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
« no previous file with comments | « chrome/browser/profile_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/download_resource_handler.cc
diff --git a/chrome/browser/renderer_host/download_resource_handler.cc b/chrome/browser/renderer_host/download_resource_handler.cc
index 911edf8511ebbee514cf7060c4299936087a7965..3e5f3c08f7d8bc1a4752d5d3fe4213a316d64b8d 100644
--- a/chrome/browser/renderer_host/download_resource_handler.cc
+++ b/chrome/browser/renderer_host/download_resource_handler.cc
@@ -92,9 +92,14 @@ bool DownloadResourceHandler::OnResponseStarted(int request_id,
info->referrer_charset = request_->context()->referrer_charset();
info->save_info = save_info_;
ChromeThread::PostTask(
- ChromeThread::FILE, FROM_HERE,
+ ChromeThread::UI, FROM_HERE,
NewRunnableMethod(
download_file_manager_, &DownloadFileManager::StartDownload, info));
+
+ // We can't start saving the data before we create the file on disk.
+ // The request will be un-paused in DownloadFileManager::CreateDownloadFile.
+ rdh_->PauseRequest(global_id_.child_id, global_id_.request_id, true);
+
return true;
}
« no previous file with comments | « chrome/browser/profile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698