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

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

Issue 1829413002: [Downloads] Retain a BlobDataHandle in DownloadUrlParameters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index ca423c4aaf480ce34319446c129482e59c1bb70c..28f1c3fca65159c1580d58d6efcaa9d266d98e7c 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -45,6 +45,7 @@
#include "net/base/request_priority.h"
#include "net/base/upload_bytes_element_reader.h"
#include "net/url_request/url_request_context.h"
+#include "storage/browser/blob/blob_url_request_job_factory.h"
#include "url/origin.h"
namespace content {
@@ -58,6 +59,12 @@ scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread> BeginDownload(
scoped_ptr<net::URLRequest> url_request =
DownloadRequestCore::CreateRequestOnIOThread(download_id, params.get());
+ scoped_ptr<storage::BlobDataHandle> blob_data_handle =
+ params->GetBlobDataHandle();
+ if (blob_data_handle) {
+ storage::BlobProtocolHandler::SetRequestedBlobDataHandle(
+ url_request.get(), std::move(blob_data_handle));
+ }
// If there's a valid renderer process associated with the request, then the
// request should be driven by the ResourceLoader. Pass it over to the
« no previous file with comments | « content/browser/download/download_browsertest.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698