Index: content/browser/loader/resource_dispatcher_host_unittest.cc |
diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc |
index a1b1f7b1df531921974518a8956c6588f6e0651d..0ddf31c7e0912b616ba6610b1ed2a24a4c8174f2 100644 |
--- a/content/browser/loader/resource_dispatcher_host_unittest.cc |
+++ b/content/browser/loader/resource_dispatcher_host_unittest.cc |
@@ -25,6 +25,8 @@ |
#include "content/browser/browser_thread_impl.h" |
#include "content/browser/cert_store_impl.h" |
#include "content/browser/child_process_security_policy_impl.h" |
+#include "content/browser/download/download_manager_impl.h" |
+#include "content/browser/download/download_resource_handler.h" |
#include "content/browser/frame_host/navigation_request_info.h" |
#include "content/browser/loader/cross_site_resource_handler.h" |
#include "content/browser/loader/detachable_resource_handler.h" |
@@ -854,6 +856,7 @@ class ResourceDispatcherHostTest : public testing::TestWithParam<TestConfig>, |
ResourceDispatcherHostTest() |
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), |
+ host_(base::Bind(base::Bind(&DownloadResourceHandler::Create))), |
use_test_ssl_certificate_(false), |
send_data_received_acks_(false), |
auto_advance_(false) { |
@@ -1242,12 +1245,12 @@ void ResourceDispatcherHostTest::MakeWebContentsAssociatedDownloadRequest( |
browser_context_->GetResourceContext()->GetRequestContext(); |
std::unique_ptr<net::URLRequest> request( |
request_context->CreateRequest(url, net::DEFAULT_PRIORITY, NULL)); |
- host_.BeginDownload(std::move(request), Referrer(), |
- false, // is_content_initiated |
- browser_context_->GetResourceContext(), |
- web_contents_->GetRenderProcessHost()->GetID(), |
- web_contents_->GetRoutingID(), |
- web_contents_->GetMainFrame()->GetRoutingID(), false); |
+ DownloadManagerImpl::BeginDownloadRequest( |
+ std::move(request), Referrer(), browser_context_->GetResourceContext(), |
+ false, // is_content_initiated |
+ web_contents_->GetRenderProcessHost()->GetID(), |
+ web_contents_->GetRoutingID(), |
+ web_contents_->GetMainFrame()->GetRoutingID(), false); |
} |
void ResourceDispatcherHostTest::CancelRequest(int request_id) { |