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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc

Issue 1888963004: Add HttpProtocolHandler and convert everything to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-supports-scheme
Patch Set: even more rebase Created 4 years, 8 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: components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
index 8b6f768042fc3bf244ce29d6c055462228e1df03..17d0fe6340483aac663704a9f6857a7e9c02b823 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
@@ -601,11 +601,12 @@ void DataReductionProxyTestContext::AttachToURLRequestContext(
io_data()->CreateNetworkDelegate(
base::WrapUnique(new net::TestNetworkDelegate()), true));
+ std::unique_ptr<net::URLRequestJobFactory> job_factory_impl =
+ net::URLRequestJobFactoryImpl::CreateWithDefaultProtocolHandlers();
+
request_context_storage->set_job_factory(
base::WrapUnique(new net::URLRequestInterceptingJobFactory(
- std::unique_ptr<net::URLRequestJobFactory>(
- new net::URLRequestJobFactoryImpl()),
- io_data()->CreateInterceptor())));
+ std::move(job_factory_impl), io_data()->CreateInterceptor())));
}
void DataReductionProxyTestContext::

Powered by Google App Engine
This is Rietveld 408576698