| 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 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
| 16 #include "net/base/trusted_spdy_proxy_provider.h" |
| 16 #include "net/cert/mock_cert_verifier.h" | 17 #include "net/cert/mock_cert_verifier.h" |
| 17 #include "net/http/http_cache.h" | 18 #include "net/http/http_cache.h" |
| 18 #include "net/http/http_network_session.h" | 19 #include "net/http/http_network_session.h" |
| 19 #include "net/http/http_network_transaction.h" | 20 #include "net/http/http_network_transaction.h" |
| 20 #include "net/http/http_server_properties_impl.h" | 21 #include "net/http/http_server_properties_impl.h" |
| 21 #include "net/socket/socket_test_util.h" | 22 #include "net/socket/socket_test_util.h" |
| 22 #include "net/socket/ssl_client_socket.h" | 23 #include "net/socket/ssl_client_socket.h" |
| 23 #include "net/socket/transport_client_socket_pool.h" | 24 #include "net/socket/transport_client_socket_pool.h" |
| 24 #include "net/spdy/buffered_spdy_framer.h" | 25 #include "net/spdy/buffered_spdy_framer.h" |
| 25 #include "net/spdy/spdy_framer.h" | 26 #include "net/spdy/spdy_framer.h" |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 params.enable_user_alternate_protocol_ports = | 430 params.enable_user_alternate_protocol_ports = |
| 430 session_deps->enable_user_alternate_protocol_ports; | 431 session_deps->enable_user_alternate_protocol_ports; |
| 431 params.enable_npn = session_deps->enable_npn; | 432 params.enable_npn = session_deps->enable_npn; |
| 432 params.spdy_default_protocol = session_deps->protocol; | 433 params.spdy_default_protocol = session_deps->protocol; |
| 433 params.spdy_session_max_recv_window_size = | 434 params.spdy_session_max_recv_window_size = |
| 434 session_deps->session_max_recv_window_size; | 435 session_deps->session_max_recv_window_size; |
| 435 params.spdy_stream_max_recv_window_size = | 436 params.spdy_stream_max_recv_window_size = |
| 436 session_deps->stream_max_recv_window_size; | 437 session_deps->stream_max_recv_window_size; |
| 437 params.time_func = session_deps->time_func; | 438 params.time_func = session_deps->time_func; |
| 438 params.next_protos = session_deps->next_protos; | 439 params.next_protos = session_deps->next_protos; |
| 439 params.trusted_spdy_proxy = session_deps->trusted_spdy_proxy; | 440 params.trusted_spdy_proxy_provider = |
| 441 session_deps->trusted_spdy_proxy_provider; |
| 440 params.use_alternative_services = session_deps->use_alternative_services; | 442 params.use_alternative_services = session_deps->use_alternative_services; |
| 441 params.net_log = session_deps->net_log; | 443 params.net_log = session_deps->net_log; |
| 442 return params; | 444 return params; |
| 443 } | 445 } |
| 444 | 446 |
| 445 SpdyURLRequestContext::SpdyURLRequestContext(NextProto protocol) | 447 SpdyURLRequestContext::SpdyURLRequestContext(NextProto protocol) |
| 446 : storage_(this) { | 448 : storage_(this) { |
| 447 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; | 449 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; |
| 448 | 450 |
| 449 storage_.set_host_resolver(scoped_ptr<HostResolver>(new MockHostResolver)); | 451 storage_.set_host_resolver(scoped_ptr<HostResolver>(new MockHostResolver)); |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 } | 1343 } |
| 1342 } | 1344 } |
| 1343 | 1345 |
| 1344 void SpdyTestUtil::SetPriority(RequestPriority priority, | 1346 void SpdyTestUtil::SetPriority(RequestPriority priority, |
| 1345 SpdySynStreamIR* ir) const { | 1347 SpdySynStreamIR* ir) const { |
| 1346 ir->set_priority(ConvertRequestPriorityToSpdyPriority( | 1348 ir->set_priority(ConvertRequestPriorityToSpdyPriority( |
| 1347 priority, spdy_version())); | 1349 priority, spdy_version())); |
| 1348 } | 1350 } |
| 1349 | 1351 |
| 1350 } // namespace net | 1352 } // namespace net |
| OLD | NEW |