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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host.cc

Issue 7237034: sql::MetaTable.next_download_id, DownloadManager::GetNextId() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: " 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: content/browser/renderer_host/resource_dispatcher_host.cc
diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
index f0d933bdbec50cbf021bb993f8347cd8bf34a00a..80a52270d76259f61343d17b57afa7ee3e6c696b 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host.cc
@@ -726,12 +726,22 @@ void ResourceDispatcherHost::BeginDownload(
request_id_--;
+ DownloadId dl_id;
+ void* next_download_id_thunk = context.GetUserData(reinterpret_cast<void*>(
Randy Smith (Not in Mondays) 2011/08/03 21:10:29 Same comment: TODO based on download_manager.h goi
benjhayden 2011/08/04 17:15:00 Done.
+ BASE_HASH_NAMESPACE::hash<std::string>()("next_download_id_thunk")));
+ DCHECK(next_download_id_thunk);
+ if (next_download_id_thunk != NULL) {
+ dl_id = reinterpret_cast<DownloadManager::GetNextIdThunkType*>(
+ next_download_id_thunk)->Run();
+ }
+
scoped_refptr<ResourceHandler> handler(
new DownloadResourceHandler(this,
child_id,
route_id,
request_id_,
url,
+ dl_id,
download_file_manager_.get(),
request,
prompt_for_save_location,
@@ -752,7 +762,7 @@ void ResourceDispatcherHost::BeginDownload(
request->set_method("GET");
request->set_referrer(MaybeStripReferrer(referrer).spec());
- request->set_context(context.request_context());
+ request->set_context(request_context);
request->set_load_flags(request->load_flags() |
net::LOAD_IS_DOWNLOAD);

Powered by Google App Engine
This is Rietveld 408576698