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

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

Issue 7237034: sql::MetaTable.next_download_id, DownloadManager::GetNextId() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: sql::MetaTable.next_download_id, DownloadId, DownloadManager::GetNextId() Created 9 years, 5 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: 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,

Powered by Google App Engine
This is Rietveld 408576698