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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.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: more addressing comments 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_bypass_protocol_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
index 03d183585af9d7df84ad341d0c6436e5e6801118..33a5c64d28e4b9ca650266bc5c62d211e403a9b9 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
@@ -68,7 +68,9 @@ class SimpleURLRequestInterceptor : public net::URLRequestInterceptor {
net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override {
- return net::URLRequestHttpJob::Factory(request, network_delegate, "http");
+ return new net::URLRequestHttpJob(
+ request, network_delegate,
+ request->context()->http_user_agent_settings());
}
};
@@ -117,8 +119,8 @@ class DataReductionProxyProtocolTest : public testing::Test {
new DataReductionProxyInterceptor(
test_context_->config(), test_context_->io_data()->config_client(),
bypass_stats_.get(), test_context_->event_creator());
- std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory_impl(
- new net::URLRequestJobFactoryImpl());
+ std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory_impl =
+ net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers();
job_factory_.reset(new net::URLRequestInterceptingJobFactory(
std::move(job_factory_impl), base::WrapUnique(interceptor)));

Powered by Google App Engine
This is Rietveld 408576698