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

Unified Diff: content/browser/loader/resource_dispatcher_host_unittest.cc

Issue 2251643003: Remove the BeginSaveFile and BeginDownload methods from ResourceDispatcherHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address next round of review comments and keep the download test in resource_dispatcher_host_unitteā€¦ Created 4 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
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698