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

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: rebase (needs fixing) Created 4 years, 2 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 ae6e0fd8ed5e0e8c97f8c72ebfd6da03b06f8e76..64c225af2599df02e181c049748adbc19c7a8c8a 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::MakeUnique<net::TestNetworkDelegate>(), true));
+ std::unique_ptr<net::URLRequestJobFactory> job_factory_impl =
+ net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers();
+
request_context_storage->set_job_factory(
base::MakeUnique<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