| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/data_reduction_proxy/content/browser/content_lofi_decider.h
" | 5 #include "components/data_reduction_proxy/content/browser/content_lofi_decider.h
" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 .WithClient(kClient) | 71 .WithClient(kClient) |
| 72 .WithMockClientSocketFactory(&mock_socket_factory_) | 72 .WithMockClientSocketFactory(&mock_socket_factory_) |
| 73 .WithURLRequestContext(&context_) | 73 .WithURLRequestContext(&context_) |
| 74 .Build(); | 74 .Build(); |
| 75 | 75 |
| 76 data_reduction_proxy_network_delegate_.reset( | 76 data_reduction_proxy_network_delegate_.reset( |
| 77 new DataReductionProxyNetworkDelegate( | 77 new DataReductionProxyNetworkDelegate( |
| 78 scoped_ptr<net::NetworkDelegate>(new net::NetworkDelegateImpl()), | 78 scoped_ptr<net::NetworkDelegate>(new net::NetworkDelegateImpl()), |
| 79 test_context_->config(), | 79 test_context_->config(), |
| 80 test_context_->io_data()->request_options(), | 80 test_context_->io_data()->request_options(), |
| 81 test_context_->configurator(), | 81 test_context_->configurator())); |
| 82 test_context_->net_log(), test_context_->event_creator())); | |
| 83 | 82 |
| 84 data_reduction_proxy_network_delegate_->InitIODataAndUMA( | 83 data_reduction_proxy_network_delegate_->InitIODataAndUMA( |
| 85 test_context_->io_data(), test_context_->io_data()->bypass_stats()); | 84 test_context_->io_data(), test_context_->io_data()->bypass_stats()); |
| 86 | 85 |
| 87 context_.set_network_delegate(data_reduction_proxy_network_delegate_.get()); | 86 context_.set_network_delegate(data_reduction_proxy_network_delegate_.get()); |
| 88 | 87 |
| 89 scoped_ptr<data_reduction_proxy::ContentLoFiDecider> | 88 scoped_ptr<data_reduction_proxy::ContentLoFiDecider> |
| 90 data_reduction_proxy_lofi_decider( | 89 data_reduction_proxy_lofi_decider( |
| 91 new data_reduction_proxy::ContentLoFiDecider()); | 90 new data_reduction_proxy::ContentLoFiDecider()); |
| 92 test_context_->io_data()->set_lofi_decider( | 91 test_context_->io_data()->set_lofi_decider( |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 scoped_ptr<net::URLRequest> request = | 388 scoped_ptr<net::URLRequest> request = |
| 390 CreateRequest(tests[i].network_prohibitively_slow); | 389 CreateRequest(tests[i].network_prohibitively_slow); |
| 391 net::HttpRequestHeaders headers; | 390 net::HttpRequestHeaders headers; |
| 392 NotifyBeforeSendProxyHeaders(&headers, request.get()); | 391 NotifyBeforeSendProxyHeaders(&headers, request.get()); |
| 393 | 392 |
| 394 VerifyLoFiHeader(expect_lofi_header, headers); | 393 VerifyLoFiHeader(expect_lofi_header, headers); |
| 395 } | 394 } |
| 396 } | 395 } |
| 397 | 396 |
| 398 } // namespace data_reduction_roxy | 397 } // namespace data_reduction_roxy |
| OLD | NEW |