| 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 "net/http/http_stream_factory_impl.h" | 5 #include "net/http/http_stream_factory_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
| 15 #include "net/base/port_util.h" | 16 #include "net/base/port_util.h" |
| 16 #include "net/base/test_completion_callback.h" | 17 #include "net/base/test_completion_callback.h" |
| 17 #include "net/base/test_data_directory.h" | 18 #include "net/base/test_data_directory.h" |
| 18 #include "net/cert/mock_cert_verifier.h" | 19 #include "net/cert/mock_cert_verifier.h" |
| 19 #include "net/dns/mock_host_resolver.h" | 20 #include "net/dns/mock_host_resolver.h" |
| 20 #include "net/http/bidirectional_stream_impl.h" | 21 #include "net/http/bidirectional_stream_impl.h" |
| 21 #include "net/http/bidirectional_stream_request_info.h" | 22 #include "net/http/bidirectional_stream_request_info.h" |
| 22 #include "net/http/http_auth_handler_factory.h" | 23 #include "net/http/http_auth_handler_factory.h" |
| 23 #include "net/http/http_network_session.h" | 24 #include "net/http/http_network_session.h" |
| 24 #include "net/http/http_network_session_peer.h" | 25 #include "net/http/http_network_session_peer.h" |
| 25 #include "net/http/http_network_transaction.h" | 26 #include "net/http/http_network_transaction.h" |
| 26 #include "net/http/http_request_info.h" | 27 #include "net/http/http_request_info.h" |
| 28 #include "net/http/http_response_info.h" |
| 27 #include "net/http/http_server_properties.h" | 29 #include "net/http/http_server_properties.h" |
| 28 #include "net/http/http_server_properties_impl.h" | 30 #include "net/http/http_server_properties_impl.h" |
| 29 #include "net/http/http_stream.h" | 31 #include "net/http/http_stream.h" |
| 30 #include "net/http/transport_security_state.h" | 32 #include "net/http/transport_security_state.h" |
| 31 #include "net/log/net_log.h" | 33 #include "net/log/net_log.h" |
| 32 #include "net/proxy/proxy_info.h" | 34 #include "net/proxy/proxy_info.h" |
| 33 #include "net/proxy/proxy_service.h" | 35 #include "net/proxy/proxy_service.h" |
| 34 #include "net/quic/quic_http_utils.h" | 36 #include "net/quic/quic_http_utils.h" |
| 35 #include "net/quic/quic_server_id.h" | 37 #include "net/quic/quic_server_id.h" |
| 36 #include "net/quic/test_tools/crypto_test_utils.h" | 38 #include "net/quic/test_tools/crypto_test_utils.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 return false; | 110 return false; |
| 109 } | 111 } |
| 110 void GetSSLInfo(SSLInfo* ssl_info) override {} | 112 void GetSSLInfo(SSLInfo* ssl_info) override {} |
| 111 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} | 113 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} |
| 112 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } | 114 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } |
| 113 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | 115 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
| 114 std::vector<uint8_t>* out) override { | 116 std::vector<uint8_t>* out) override { |
| 115 ADD_FAILURE(); | 117 ADD_FAILURE(); |
| 116 return ERR_NOT_IMPLEMENTED; | 118 return ERR_NOT_IMPLEMENTED; |
| 117 } | 119 } |
| 118 void Drain(HttpNetworkSession* session) override {} | 120 void Drain(HttpNetworkSession* session, |
| 121 scoped_ptr<HttpResponseInfo> response_info) override {} |
| 119 void PopulateNetErrorDetails(NetErrorDetails* details) override { return; } | 122 void PopulateNetErrorDetails(NetErrorDetails* details) override { return; } |
| 120 void SetPriority(RequestPriority priority) override {} | 123 void SetPriority(RequestPriority priority) override {} |
| 121 UploadProgress GetUploadProgress() const override { return UploadProgress(); } | 124 UploadProgress GetUploadProgress() const override { return UploadProgress(); } |
| 122 HttpStream* RenewStreamForAuth() override { return nullptr; } | 125 HttpStream* RenewStreamForAuth() override { return nullptr; } |
| 123 | 126 |
| 124 scoped_ptr<WebSocketStream> Upgrade() override { | 127 scoped_ptr<WebSocketStream> Upgrade() override { |
| 125 return scoped_ptr<WebSocketStream>(); | 128 return scoped_ptr<WebSocketStream>(); |
| 126 } | 129 } |
| 127 | 130 |
| 128 private: | 131 private: |
| (...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2042 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); | 2045 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); |
| 2043 | 2046 |
| 2044 // Make sure there is no orphaned job. it is already canceled. | 2047 // Make sure there is no orphaned job. it is already canceled. |
| 2045 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( | 2048 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( |
| 2046 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); | 2049 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); |
| 2047 } | 2050 } |
| 2048 | 2051 |
| 2049 } // namespace | 2052 } // namespace |
| 2050 | 2053 |
| 2051 } // namespace net | 2054 } // namespace net |
| OLD | NEW |