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

Side by Side Diff: components/data_reduction_proxy/content/browser/content_lofi_decider_unittest.cc

Issue 1680893002: Moving proxy resolution logic out of NetworkDelegate and into ProxyDelegate for DataReductionProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698