| 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 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 5 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| 6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 class HttpStreamBase; | 31 class HttpStreamBase; |
| 32 class HttpStreamRequest; | 32 class HttpStreamRequest; |
| 33 class IOBuffer; | 33 class IOBuffer; |
| 34 class SpdySession; | 34 class SpdySession; |
| 35 struct HttpRequestInfo; | 35 struct HttpRequestInfo; |
| 36 | 36 |
| 37 class NET_EXPORT_PRIVATE HttpNetworkTransaction | 37 class NET_EXPORT_PRIVATE HttpNetworkTransaction |
| 38 : public HttpTransaction, | 38 : public HttpTransaction, |
| 39 public HttpStreamRequest::Delegate { | 39 public HttpStreamRequest::Delegate { |
| 40 public: | 40 public: |
| 41 HttpNetworkTransaction(RequestPriority priority, | 41 HttpNetworkTransaction(RequestPriority priority, HttpNetworkSession* session); |
| 42 HttpNetworkSession* session); | |
| 43 | 42 |
| 44 virtual ~HttpNetworkTransaction(); | 43 virtual ~HttpNetworkTransaction(); |
| 45 | 44 |
| 46 // HttpTransaction methods: | 45 // HttpTransaction methods: |
| 47 virtual int Start(const HttpRequestInfo* request_info, | 46 virtual int Start(const HttpRequestInfo* request_info, |
| 48 const CompletionCallback& callback, | 47 const CompletionCallback& callback, |
| 49 const BoundNetLog& net_log) OVERRIDE; | 48 const BoundNetLog& net_log) OVERRIDE; |
| 50 virtual int RestartIgnoringLastError( | 49 virtual int RestartIgnoringLastError( |
| 51 const CompletionCallback& callback) OVERRIDE; | 50 const CompletionCallback& callback) OVERRIDE; |
| 52 virtual int RestartWithCertificate( | 51 virtual int RestartWithCertificate( |
| (...skipping 30 matching lines...) Expand all Loading... |
| 83 HttpStreamBase* stream) OVERRIDE; | 82 HttpStreamBase* stream) OVERRIDE; |
| 84 virtual void OnWebSocketHandshakeStreamReady( | 83 virtual void OnWebSocketHandshakeStreamReady( |
| 85 const SSLConfig& used_ssl_config, | 84 const SSLConfig& used_ssl_config, |
| 86 const ProxyInfo& used_proxy_info, | 85 const ProxyInfo& used_proxy_info, |
| 87 WebSocketHandshakeStreamBase* stream) OVERRIDE; | 86 WebSocketHandshakeStreamBase* stream) OVERRIDE; |
| 88 virtual void OnStreamFailed(int status, | 87 virtual void OnStreamFailed(int status, |
| 89 const SSLConfig& used_ssl_config) OVERRIDE; | 88 const SSLConfig& used_ssl_config) OVERRIDE; |
| 90 virtual void OnCertificateError(int status, | 89 virtual void OnCertificateError(int status, |
| 91 const SSLConfig& used_ssl_config, | 90 const SSLConfig& used_ssl_config, |
| 92 const SSLInfo& ssl_info) OVERRIDE; | 91 const SSLInfo& ssl_info) OVERRIDE; |
| 93 virtual void OnNeedsProxyAuth( | 92 virtual void OnNeedsProxyAuth(const HttpResponseInfo& response_info, |
| 94 const HttpResponseInfo& response_info, | 93 const SSLConfig& used_ssl_config, |
| 95 const SSLConfig& used_ssl_config, | 94 const ProxyInfo& used_proxy_info, |
| 96 const ProxyInfo& used_proxy_info, | 95 HttpAuthController* auth_controller) OVERRIDE; |
| 97 HttpAuthController* auth_controller) OVERRIDE; | |
| 98 virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config, | 96 virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config, |
| 99 SSLCertRequestInfo* cert_info) OVERRIDE; | 97 SSLCertRequestInfo* cert_info) OVERRIDE; |
| 100 virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, | 98 virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, |
| 101 const SSLConfig& used_ssl_config, | 99 const SSLConfig& used_ssl_config, |
| 102 const ProxyInfo& used_proxy_info, | 100 const ProxyInfo& used_proxy_info, |
| 103 HttpStreamBase* stream) OVERRIDE; | 101 HttpStreamBase* stream) OVERRIDE; |
| 104 | 102 |
| 105 private: | 103 private: |
| 106 friend class HttpNetworkTransactionSSLTest; | 104 friend class HttpNetworkTransactionSSLTest; |
| 107 | 105 |
| 108 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, | 106 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, ResetStateForRestart); |
| 109 ResetStateForRestart); | 107 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateReceived); |
| 110 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, | 108 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateSent); |
| 111 WindowUpdateReceived); | 109 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateOverflow); |
| 112 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, | 110 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume); |
| 113 WindowUpdateSent); | |
| 114 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, | |
| 115 WindowUpdateOverflow); | |
| 116 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, | |
| 117 FlowControlStallResume); | |
| 118 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, | 111 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, |
| 119 FlowControlStallResumeAfterSettings); | 112 FlowControlStallResumeAfterSettings); |
| 120 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, | 113 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, |
| 121 FlowControlNegativeSendWindowSize); | 114 FlowControlNegativeSendWindowSize); |
| 122 | 115 |
| 123 enum State { | 116 enum State { |
| 124 STATE_NOTIFY_BEFORE_CREATE_STREAM, | 117 STATE_NOTIFY_BEFORE_CREATE_STREAM, |
| 125 STATE_CREATE_STREAM, | 118 STATE_CREATE_STREAM, |
| 126 STATE_CREATE_STREAM_COMPLETE, | 119 STATE_CREATE_STREAM_COMPLETE, |
| 127 STATE_INIT_STREAM, | 120 STATE_INIT_STREAM, |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 websocket_handshake_stream_base_create_helper_; | 327 websocket_handshake_stream_base_create_helper_; |
| 335 | 328 |
| 336 BeforeNetworkStartCallback before_network_start_callback_; | 329 BeforeNetworkStartCallback before_network_start_callback_; |
| 337 | 330 |
| 338 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); | 331 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); |
| 339 }; | 332 }; |
| 340 | 333 |
| 341 } // namespace net | 334 } // namespace net |
| 342 | 335 |
| 343 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 336 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| OLD | NEW |