Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc |
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc |
index 3b33674e630f666b173c6b4effd8c8ef387d1140..b5e0ab4224452d7113c9b24d33a1ccaff9849b35 100644 |
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc |
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc |
@@ -65,15 +65,18 @@ const std::string kErrorBody = "bad"; |
class DataReductionProxyBypassStatsTest : public testing::Test { |
public: |
- DataReductionProxyBypassStatsTest() : context_(true) { |
+ DataReductionProxyBypassStatsTest() |
+ : context_(true), |
+ test_job_factory_( |
+ net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers()) { |
context_.Init(); |
// The |test_job_factory_| takes ownership of the interceptor. |
test_job_interceptor_ = new net::TestJobInterceptor(); |
- EXPECT_TRUE(test_job_factory_.SetProtocolHandler( |
- url::kHttpScheme, base::WrapUnique(test_job_interceptor_))); |
+ test_job_factory_.reset(new net::URLRequestInterceptingJobFactory( |
+ std::move(test_job_factory_), base::WrapUnique(test_job_interceptor_))); |
- context_.set_job_factory(&test_job_factory_); |
+ context_.set_job_factory(test_job_factory_.get()); |
test_context_ = |
DataReductionProxyTestContext::Builder().WithMockConfig().Build(); |
@@ -130,7 +133,7 @@ class DataReductionProxyBypassStatsTest : public testing::Test { |
std::unique_ptr<net::URLRequest> mock_url_request_; |
// |test_job_interceptor_| is owned by |test_job_factory_|. |
net::TestJobInterceptor* test_job_interceptor_; |
- net::URLRequestJobFactoryImpl test_job_factory_; |
+ std::unique_ptr<net::URLRequestJobFactory> test_job_factory_; |
std::unique_ptr<DataReductionProxyTestContext> test_context_; |
}; |