| OLD | NEW |
| 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/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 params_.cert_verifier = &cert_verifier_; | 424 params_.cert_verifier = &cert_verifier_; |
| 425 params_.transport_security_state = &transport_security_state_; | 425 params_.transport_security_state = &transport_security_state_; |
| 426 params_.cert_transparency_verifier = cert_transparency_verifier_.get(); | 426 params_.cert_transparency_verifier = cert_transparency_verifier_.get(); |
| 427 params_.socket_performance_watcher_factory = | 427 params_.socket_performance_watcher_factory = |
| 428 test_network_quality_estimator_.get(); | 428 test_network_quality_estimator_.get(); |
| 429 params_.proxy_service = proxy_service_.get(); | 429 params_.proxy_service = proxy_service_.get(); |
| 430 params_.ssl_config_service = ssl_config_service_.get(); | 430 params_.ssl_config_service = ssl_config_service_.get(); |
| 431 params_.http_auth_handler_factory = auth_handler_factory_.get(); | 431 params_.http_auth_handler_factory = auth_handler_factory_.get(); |
| 432 params_.http_server_properties = http_server_properties_.GetWeakPtr(); | 432 params_.http_server_properties = http_server_properties_.GetWeakPtr(); |
| 433 params_.quic_supported_versions = SupportedVersions(GetParam()); | 433 params_.quic_supported_versions = SupportedVersions(GetParam()); |
| 434 for (const char* host : |
| 435 {kDefaultServerHostName, "www.example.com", "news.example.com", |
| 436 "bar.example.com", "foo.example.com", "www.example.org", |
| 437 "invalid.example.org", "docs.example.org"}) { |
| 438 params_.quic_host_whitelist.insert(host); |
| 439 } |
| 434 | 440 |
| 435 test_network_quality_estimator_->AddRTTObserver(&rtt_observer_); | 441 test_network_quality_estimator_->AddRTTObserver(&rtt_observer_); |
| 436 | 442 |
| 437 if (use_next_protos) { | 443 if (use_next_protos) { |
| 438 params_.use_alternative_services = true; | 444 params_.use_alternative_services = true; |
| 439 params_.next_protos = NextProtosWithSpdyAndQuic(true, true); | 445 params_.next_protos = NextProtosWithSpdyAndQuic(true, true); |
| 440 } | 446 } |
| 441 | 447 |
| 442 session_.reset(new HttpNetworkSession(params_)); | 448 session_.reset(new HttpNetworkSession(params_)); |
| 443 session_->quic_stream_factory()->set_require_confirmation(false); | 449 session_->quic_stream_factory()->set_require_confirmation(false); |
| (...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2248 request_.url = GURL("https://www.example.org:443"); | 2254 request_.url = GURL("https://www.example.org:443"); |
| 2249 AddHangingNonAlternateProtocolSocketData(); | 2255 AddHangingNonAlternateProtocolSocketData(); |
| 2250 CreateSessionWithNextProtos(); | 2256 CreateSessionWithNextProtos(); |
| 2251 AddQuicAlternateProtocolMapping(MockCryptoClientStream::CONFIRM_HANDSHAKE); | 2257 AddQuicAlternateProtocolMapping(MockCryptoClientStream::CONFIRM_HANDSHAKE); |
| 2252 SendRequestAndExpectQuicResponse("hello!"); | 2258 SendRequestAndExpectQuicResponse("hello!"); |
| 2253 EXPECT_TRUE(rtt_observer_.rtt_notification_received()); | 2259 EXPECT_TRUE(rtt_observer_.rtt_notification_received()); |
| 2254 } | 2260 } |
| 2255 | 2261 |
| 2256 } // namespace test | 2262 } // namespace test |
| 2257 } // namespace net | 2263 } // namespace net |
| OLD | NEW |