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

Unified Diff: content/browser/renderer_host/buffered_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: merge AGAIN Created 9 years, 4 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/buffered_resource_handler.cc
diff --git a/content/browser/renderer_host/buffered_resource_handler.cc b/content/browser/renderer_host/buffered_resource_handler.cc
index 97b063fa9f40be91801e15de9cefdf74b1a3b30b..a71795e9ecd0c54774c8df911d50981009530d3e 100644
--- a/content/browser/renderer_host/buffered_resource_handler.cc
+++ b/content/browser/renderer_host/buffered_resource_handler.cc
@@ -16,6 +16,7 @@
#include "content/browser/renderer_host/resource_dispatcher_host_delegate.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/renderer_host/x509_user_cert_resource_handler.h"
+#include "content/browser/resource_context.h"
#include "content/common/resource_response.h"
#include "net/base/io_buffer.h"
#include "net/base/mime_sniffer.h"
@@ -308,12 +309,17 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id,
info->set_is_download(true);
+ CHECK(info->context());
+ CHECK(!info->context()->next_download_id_thunk().is_null());
jam 2011/08/23 17:54:19 nit: these two checks are redundant, since if they
benjhayden 2011/08/24 14:33:00 Done.
+ DownloadId dl_id = info->context()->next_download_id_thunk().Run();
+
scoped_refptr<ResourceHandler> handler(
new DownloadResourceHandler(host_,
info->child_id(),
info->route_id(),
info->request_id(),
request_->url(),
+ dl_id,
host_->download_file_manager(),
request_,
false,

Powered by Google App Engine
This is Rietveld 408576698