| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include <math.h> // ceil | 7 #include <math.h> // ceil |
| 8 #include <stdarg.h> | 8 #include <stdarg.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "net/log/net_log.h" | 58 #include "net/log/net_log.h" |
| 59 #include "net/log/test_net_log.h" | 59 #include "net/log/test_net_log.h" |
| 60 #include "net/log/test_net_log_entry.h" | 60 #include "net/log/test_net_log_entry.h" |
| 61 #include "net/log/test_net_log_util.h" | 61 #include "net/log/test_net_log_util.h" |
| 62 #include "net/proxy/mock_proxy_resolver.h" | 62 #include "net/proxy/mock_proxy_resolver.h" |
| 63 #include "net/proxy/proxy_config_service_fixed.h" | 63 #include "net/proxy/proxy_config_service_fixed.h" |
| 64 #include "net/proxy/proxy_info.h" | 64 #include "net/proxy/proxy_info.h" |
| 65 #include "net/proxy/proxy_resolver.h" | 65 #include "net/proxy/proxy_resolver.h" |
| 66 #include "net/proxy/proxy_service.h" | 66 #include "net/proxy/proxy_service.h" |
| 67 #include "net/socket/client_socket_factory.h" | 67 #include "net/socket/client_socket_factory.h" |
| 68 #include "net/socket/client_socket_pool.h" |
| 68 #include "net/socket/client_socket_pool_manager.h" | 69 #include "net/socket/client_socket_pool_manager.h" |
| 69 #include "net/socket/connection_attempts.h" | 70 #include "net/socket/connection_attempts.h" |
| 70 #include "net/socket/mock_client_socket_pool_manager.h" | 71 #include "net/socket/mock_client_socket_pool_manager.h" |
| 71 #include "net/socket/next_proto.h" | 72 #include "net/socket/next_proto.h" |
| 72 #include "net/socket/socket_test_util.h" | 73 #include "net/socket/socket_test_util.h" |
| 73 #include "net/socket/ssl_client_socket.h" | 74 #include "net/socket/ssl_client_socket.h" |
| 74 #include "net/spdy/spdy_framer.h" | 75 #include "net/spdy/spdy_framer.h" |
| 75 #include "net/spdy/spdy_session.h" | 76 #include "net/spdy/spdy_session.h" |
| 76 #include "net/spdy/spdy_session_pool.h" | 77 #include "net/spdy/spdy_session_pool.h" |
| 77 #include "net/spdy/spdy_test_util_common.h" | 78 #include "net/spdy/spdy_test_util_common.h" |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 CaptureGroupNameSocketPool(HostResolver* host_resolver, | 580 CaptureGroupNameSocketPool(HostResolver* host_resolver, |
| 580 CertVerifier* cert_verifier); | 581 CertVerifier* cert_verifier); |
| 581 | 582 |
| 582 const std::string last_group_name_received() const { | 583 const std::string last_group_name_received() const { |
| 583 return last_group_name_; | 584 return last_group_name_; |
| 584 } | 585 } |
| 585 | 586 |
| 586 int RequestSocket(const std::string& group_name, | 587 int RequestSocket(const std::string& group_name, |
| 587 const void* socket_params, | 588 const void* socket_params, |
| 588 RequestPriority priority, | 589 RequestPriority priority, |
| 590 ClientSocketPool::IgnoreLimits ignore_limits, |
| 589 ClientSocketHandle* handle, | 591 ClientSocketHandle* handle, |
| 590 const CompletionCallback& callback, | 592 const CompletionCallback& callback, |
| 591 const BoundNetLog& net_log) override { | 593 const BoundNetLog& net_log) override { |
| 592 last_group_name_ = group_name; | 594 last_group_name_ = group_name; |
| 593 return ERR_IO_PENDING; | 595 return ERR_IO_PENDING; |
| 594 } | 596 } |
| 595 void CancelRequest(const std::string& group_name, | 597 void CancelRequest(const std::string& group_name, |
| 596 ClientSocketHandle* handle) override {} | 598 ClientSocketHandle* handle) override {} |
| 597 void ReleaseSocket(const std::string& group_name, | 599 void ReleaseSocket(const std::string& group_name, |
| 598 scoped_ptr<StreamSocket> socket, | 600 scoped_ptr<StreamSocket> socket, |
| (...skipping 15197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15796 | 15798 |
| 15797 scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); | 15799 scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
| 15798 HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get()); | 15800 HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get()); |
| 15799 | 15801 |
| 15800 EXPECT_THAT(trans.server_ssl_config_.alpn_protos, | 15802 EXPECT_THAT(trans.server_ssl_config_.alpn_protos, |
| 15801 testing::ElementsAre(kProtoHTTP2, kProtoSPDY31, kProtoHTTP11)); | 15803 testing::ElementsAre(kProtoHTTP2, kProtoSPDY31, kProtoHTTP11)); |
| 15802 EXPECT_TRUE(trans.server_ssl_config_.npn_protos.empty()); | 15804 EXPECT_TRUE(trans.server_ssl_config_.npn_protos.empty()); |
| 15803 } | 15805 } |
| 15804 | 15806 |
| 15805 } // namespace net | 15807 } // namespace net |
| OLD | NEW |