| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "net/spdy/spdy_test_util_common.h" | 5 #include "net/spdy/spdy_test_util_common.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 enable_priority_dependencies(true), | 343 enable_priority_dependencies(true), |
| 344 enable_spdy31(true), | 344 enable_spdy31(true), |
| 345 enable_quic(false), | 345 enable_quic(false), |
| 346 protocol(protocol), | 346 protocol(protocol), |
| 347 session_max_recv_window_size( | 347 session_max_recv_window_size( |
| 348 SpdySession::GetDefaultInitialWindowSize(protocol)), | 348 SpdySession::GetDefaultInitialWindowSize(protocol)), |
| 349 stream_max_recv_window_size( | 349 stream_max_recv_window_size( |
| 350 SpdySession::GetDefaultInitialWindowSize(protocol)), | 350 SpdySession::GetDefaultInitialWindowSize(protocol)), |
| 351 time_func(&base::TimeTicks::Now), | 351 time_func(&base::TimeTicks::Now), |
| 352 parse_alternative_services(true), | 352 parse_alternative_services(true), |
| 353 enable_alternative_service_with_different_host(false), | 353 enable_alternative_service_with_different_host(true), |
| 354 net_log(NULL) { | 354 net_log(NULL) { |
| 355 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; | 355 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; |
| 356 | 356 |
| 357 // Note: The CancelledTransaction test does cleanup by running all | 357 // Note: The CancelledTransaction test does cleanup by running all |
| 358 // tasks in the message loop (RunAllPending). Unfortunately, that | 358 // tasks in the message loop (RunAllPending). Unfortunately, that |
| 359 // doesn't clean up tasks on the host resolver thread; and | 359 // doesn't clean up tasks on the host resolver thread; and |
| 360 // TCPConnectJob is currently not cancellable. Using synchronous | 360 // TCPConnectJob is currently not cancellable. Using synchronous |
| 361 // lookups allows the test to shutdown cleanly. Until we have | 361 // lookups allows the test to shutdown cleanly. Until we have |
| 362 // cancellable TCPConnectJobs, use synchronous lookups. | 362 // cancellable TCPConnectJobs, use synchronous lookups. |
| 363 host_resolver->set_synchronous_mode(true); | 363 host_resolver->set_synchronous_mode(true); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 382 enable_priority_dependencies(true), | 382 enable_priority_dependencies(true), |
| 383 enable_spdy31(true), | 383 enable_spdy31(true), |
| 384 enable_quic(false), | 384 enable_quic(false), |
| 385 protocol(protocol), | 385 protocol(protocol), |
| 386 session_max_recv_window_size( | 386 session_max_recv_window_size( |
| 387 SpdySession::GetDefaultInitialWindowSize(protocol)), | 387 SpdySession::GetDefaultInitialWindowSize(protocol)), |
| 388 stream_max_recv_window_size( | 388 stream_max_recv_window_size( |
| 389 SpdySession::GetDefaultInitialWindowSize(protocol)), | 389 SpdySession::GetDefaultInitialWindowSize(protocol)), |
| 390 time_func(&base::TimeTicks::Now), | 390 time_func(&base::TimeTicks::Now), |
| 391 parse_alternative_services(true), | 391 parse_alternative_services(true), |
| 392 enable_alternative_service_with_different_host(false), | 392 enable_alternative_service_with_different_host(true), |
| 393 net_log(NULL) { | 393 net_log(NULL) { |
| 394 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; | 394 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; |
| 395 } | 395 } |
| 396 | 396 |
| 397 SpdySessionDependencies::~SpdySessionDependencies() {} | 397 SpdySessionDependencies::~SpdySessionDependencies() {} |
| 398 | 398 |
| 399 // static | 399 // static |
| 400 std::unique_ptr<HttpNetworkSession> SpdySessionDependencies::SpdyCreateSession( | 400 std::unique_ptr<HttpNetworkSession> SpdySessionDependencies::SpdyCreateSession( |
| 401 SpdySessionDependencies* session_deps) { | 401 SpdySessionDependencies* session_deps) { |
| 402 HttpNetworkSession::Params params = CreateSessionParams(session_deps); | 402 HttpNetworkSession::Params params = CreateSessionParams(session_deps); |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 } | 1310 } |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 void SpdyTestUtil::SetPriority(RequestPriority priority, | 1313 void SpdyTestUtil::SetPriority(RequestPriority priority, |
| 1314 SpdySynStreamIR* ir) const { | 1314 SpdySynStreamIR* ir) const { |
| 1315 ir->set_priority(ConvertRequestPriorityToSpdyPriority( | 1315 ir->set_priority(ConvertRequestPriorityToSpdyPriority( |
| 1316 priority, spdy_version())); | 1316 priority, spdy_version())); |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 } // namespace net | 1319 } // namespace net |
| OLD | NEW |