Index: chrome/browser/renderer_host/download_throttling_resource_handler.cc |
diff --git a/chrome/browser/renderer_host/download_throttling_resource_handler.cc b/chrome/browser/renderer_host/download_throttling_resource_handler.cc |
index 34d90aee6376ad7696c04b3086fde073d21a3117..c0cc4fb8611edb19947e6b8d8320411efe9e10a8 100644 |
--- a/chrome/browser/renderer_host/download_throttling_resource_handler.cc |
+++ b/chrome/browser/renderer_host/download_throttling_resource_handler.cc |
@@ -6,8 +6,10 @@ |
#include "base/logging.h" |
#include "chrome/browser/download/download_util.h" |
+#include "chrome/browser/profiles/profile_io_data.h" |
#include "chrome/browser/renderer_host/download_resource_handler.h" |
#include "content/browser/renderer_host/resource_dispatcher_host.h" |
+#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
#include "content/common/resource_response.h" |
#include "net/base/io_buffer.h" |
#include "net/base/mime_sniffer.h" |
@@ -173,12 +175,19 @@ void DownloadThrottlingResourceHandler::CancelDownload() { |
void DownloadThrottlingResourceHandler::ContinueDownload() { |
DCHECK(!download_handler_.get()); |
if (!request_closed_) { |
+ ResourceDispatcherHostRequestInfo* info = |
+ ResourceDispatcherHost::InfoForRequest(request_); |
+ ProfileIOData* profile_io_data = reinterpret_cast<ProfileIOData*>( |
+ info->context()->GetUserData(NULL)); |
+ const DownloadManager::GetNextIdThunkType& get_next_id = |
+ profile_io_data->next_download_id_thunk(); |
download_handler_ = |
new DownloadResourceHandler(host_, |
render_process_host_id_, |
render_view_id_, |
request_id_, |
url_, |
+ get_next_id, |
host_->download_file_manager(), |
request_, |
false, |