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

Unified Diff: content/browser/download/download_resource_handler.cc

Issue 8371009: Make passing of DownloadRequestHandle separate from DownloadCreateInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 9 years, 2 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 | « content/browser/download/download_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_resource_handler.cc
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index 59fa4deb056298c013ff4b44464b651962fa7eb9..d7b5211cca4f9c5cad700d19fcbacf145c7f87ee 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -16,6 +16,7 @@
#include "content/browser/download/download_file_manager.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_request_handle.h"
+#include "content/browser/download/download_request_handle.h"
#include "content/browser/download/download_stats.h"
#include "content/browser/download/interrupt_reasons.h"
#include "content/browser/renderer_host/global_request_id.h"
@@ -98,13 +99,13 @@ bool DownloadResourceHandler::OnResponseStarted(int request_id,
info->state = DownloadItem::IN_PROGRESS;
info->download_id = download_id_.local();
info->has_user_gesture = request_info->has_user_gesture();
- info->request_handle = DownloadRequestHandle(rdh_,
- global_id_.child_id,
- render_view_id_,
- global_id_.request_id);
info->content_disposition = content_disposition_;
info->mime_type = response->response_head.mime_type;
download_stats::RecordDownloadMimeType(info->mime_type);
+
+ DownloadRequestHandle request_handle(rdh_, global_id_.child_id,
+ render_view_id_, global_id_.request_id);
+
// TODO(ahendrickson) -- Get the last modified time and etag, so we can
// resume downloading.
@@ -123,7 +124,8 @@ bool DownloadResourceHandler::OnResponseStarted(int request_id,
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
- download_file_manager_, &DownloadFileManager::StartDownload, info));
+ download_file_manager_, &DownloadFileManager::StartDownload,
+ info, request_handle));
// We can't start saving the data before we create the file on disk.
// The request will be un-paused in DownloadFileManager::CreateDownloadFile.
« no previous file with comments | « content/browser/download/download_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698