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

Side by Side Diff: net/quic/quic_network_transaction_unittest.cc

Issue 903213003: Enable QUIC for proxies based on Finch config and command line switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments, added more tests Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 void CreateSessionWithNextProtos() { 212 void CreateSessionWithNextProtos() {
213 CreateSessionWithFactory(&socket_factory_, true); 213 CreateSessionWithFactory(&socket_factory_, true);
214 } 214 }
215 215
216 // If |use_next_protos| is true, enables SPDY and QUIC. 216 // If |use_next_protos| is true, enables SPDY and QUIC.
217 void CreateSessionWithFactory(ClientSocketFactory* socket_factory, 217 void CreateSessionWithFactory(ClientSocketFactory* socket_factory,
218 bool use_next_protos) { 218 bool use_next_protos) {
219 params_.enable_quic = true; 219 params_.enable_quic = true;
220 params_.enable_quic_for_proxies = true;
Ryan Hamilton 2015/02/11 00:20:32 Same comment about only doing this if we're planni
tbansal1 2015/02/11 01:25:26 Done.
220 params_.quic_clock = clock_; 221 params_.quic_clock = clock_;
221 params_.quic_random = &random_generator_; 222 params_.quic_random = &random_generator_;
222 params_.client_socket_factory = socket_factory; 223 params_.client_socket_factory = socket_factory;
223 params_.quic_crypto_client_stream_factory = &crypto_client_stream_factory_; 224 params_.quic_crypto_client_stream_factory = &crypto_client_stream_factory_;
224 params_.host_resolver = &host_resolver_; 225 params_.host_resolver = &host_resolver_;
225 params_.cert_verifier = &cert_verifier_; 226 params_.cert_verifier = &cert_verifier_;
226 params_.transport_security_state = &transport_security_state_; 227 params_.transport_security_state = &transport_security_state_;
227 params_.proxy_service = proxy_service_.get(); 228 params_.proxy_service = proxy_service_.get();
228 params_.ssl_config_service = ssl_config_service_.get(); 229 params_.ssl_config_service = ssl_config_service_.get();
229 params_.http_auth_handler_factory = auth_handler_factory_.get(); 230 params_.http_auth_handler_factory = auth_handler_factory_.get();
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 nullptr, 1064 nullptr,
1064 net_log_.bound()); 1065 net_log_.bound());
1065 1066
1066 CreateSessionWithNextProtos(); 1067 CreateSessionWithNextProtos();
1067 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); 1068 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
1068 SendRequestAndExpectHttpResponse("hello world"); 1069 SendRequestAndExpectHttpResponse("hello world");
1069 } 1070 }
1070 1071
1071 } // namespace test 1072 } // namespace test
1072 } // namespace net 1073 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698