| 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 24 matching lines...) Expand all Loading... |
| 35 class SpdySession; | 35 class SpdySession; |
| 36 struct HttpRequestInfo; | 36 struct HttpRequestInfo; |
| 37 | 37 |
| 38 class NET_EXPORT_PRIVATE HttpNetworkTransaction | 38 class NET_EXPORT_PRIVATE HttpNetworkTransaction |
| 39 : public HttpTransaction, | 39 : public HttpTransaction, |
| 40 public HttpStreamRequest::Delegate { | 40 public HttpStreamRequest::Delegate { |
| 41 public: | 41 public: |
| 42 HttpNetworkTransaction(RequestPriority priority, | 42 HttpNetworkTransaction(RequestPriority priority, |
| 43 HttpNetworkSession* session); | 43 HttpNetworkSession* session); |
| 44 | 44 |
| 45 virtual ~HttpNetworkTransaction(); | 45 ~HttpNetworkTransaction() override; |
| 46 | 46 |
| 47 // HttpTransaction methods: | 47 // HttpTransaction methods: |
| 48 virtual int Start(const HttpRequestInfo* request_info, | 48 int Start(const HttpRequestInfo* request_info, |
| 49 const CompletionCallback& callback, | 49 const CompletionCallback& callback, |
| 50 const BoundNetLog& net_log) override; | 50 const BoundNetLog& net_log) override; |
| 51 virtual int RestartIgnoringLastError( | 51 int RestartIgnoringLastError(const CompletionCallback& callback) override; |
| 52 const CompletionCallback& callback) override; | 52 int RestartWithCertificate(X509Certificate* client_cert, |
| 53 virtual int RestartWithCertificate( | 53 const CompletionCallback& callback) override; |
| 54 X509Certificate* client_cert, | 54 int RestartWithAuth(const AuthCredentials& credentials, |
| 55 const CompletionCallback& callback) override; | 55 const CompletionCallback& callback) override; |
| 56 virtual int RestartWithAuth(const AuthCredentials& credentials, | 56 bool IsReadyToRestartForAuth() override; |
| 57 const CompletionCallback& callback) override; | |
| 58 virtual bool IsReadyToRestartForAuth() override; | |
| 59 | 57 |
| 60 virtual int Read(IOBuffer* buf, | 58 int Read(IOBuffer* buf, |
| 61 int buf_len, | 59 int buf_len, |
| 62 const CompletionCallback& callback) override; | 60 const CompletionCallback& callback) override; |
| 63 virtual void StopCaching() override; | 61 void StopCaching() override; |
| 64 virtual bool GetFullRequestHeaders( | 62 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; |
| 65 HttpRequestHeaders* headers) const override; | 63 int64 GetTotalReceivedBytes() const override; |
| 66 virtual int64 GetTotalReceivedBytes() const override; | 64 void DoneReading() override; |
| 67 virtual void DoneReading() override; | 65 const HttpResponseInfo* GetResponseInfo() const override; |
| 68 virtual const HttpResponseInfo* GetResponseInfo() const override; | 66 LoadState GetLoadState() const override; |
| 69 virtual LoadState GetLoadState() const override; | 67 UploadProgress GetUploadProgress() const override; |
| 70 virtual UploadProgress GetUploadProgress() const override; | 68 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override; |
| 71 virtual void SetQuicServerInfo(QuicServerInfo* quic_server_info) override; | 69 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |
| 72 virtual bool GetLoadTimingInfo( | 70 void SetPriority(RequestPriority priority) override; |
| 73 LoadTimingInfo* load_timing_info) const override; | 71 void SetWebSocketHandshakeStreamCreateHelper( |
| 74 virtual void SetPriority(RequestPriority priority) override; | |
| 75 virtual void SetWebSocketHandshakeStreamCreateHelper( | |
| 76 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; | 72 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; |
| 77 virtual void SetBeforeNetworkStartCallback( | 73 void SetBeforeNetworkStartCallback( |
| 78 const BeforeNetworkStartCallback& callback) override; | 74 const BeforeNetworkStartCallback& callback) override; |
| 79 virtual void SetBeforeProxyHeadersSentCallback( | 75 void SetBeforeProxyHeadersSentCallback( |
| 80 const BeforeProxyHeadersSentCallback& callback) override; | 76 const BeforeProxyHeadersSentCallback& callback) override; |
| 81 virtual int ResumeNetworkStart() override; | 77 int ResumeNetworkStart() override; |
| 82 | 78 |
| 83 // HttpStreamRequest::Delegate methods: | 79 // HttpStreamRequest::Delegate methods: |
| 84 virtual void OnStreamReady(const SSLConfig& used_ssl_config, | 80 void OnStreamReady(const SSLConfig& used_ssl_config, |
| 85 const ProxyInfo& used_proxy_info, | 81 const ProxyInfo& used_proxy_info, |
| 86 HttpStreamBase* stream) override; | 82 HttpStreamBase* stream) override; |
| 87 virtual void OnWebSocketHandshakeStreamReady( | 83 void OnWebSocketHandshakeStreamReady( |
| 88 const SSLConfig& used_ssl_config, | 84 const SSLConfig& used_ssl_config, |
| 89 const ProxyInfo& used_proxy_info, | 85 const ProxyInfo& used_proxy_info, |
| 90 WebSocketHandshakeStreamBase* stream) override; | 86 WebSocketHandshakeStreamBase* stream) override; |
| 91 virtual void OnStreamFailed(int status, | 87 void OnStreamFailed(int status, const SSLConfig& used_ssl_config) override; |
| 92 const SSLConfig& used_ssl_config) override; | 88 void OnCertificateError(int status, |
| 93 virtual void OnCertificateError(int status, | 89 const SSLConfig& used_ssl_config, |
| 90 const SSLInfo& ssl_info) override; |
| 91 void OnNeedsProxyAuth(const HttpResponseInfo& response_info, |
| 92 const SSLConfig& used_ssl_config, |
| 93 const ProxyInfo& used_proxy_info, |
| 94 HttpAuthController* auth_controller) override; |
| 95 void OnNeedsClientAuth(const SSLConfig& used_ssl_config, |
| 96 SSLCertRequestInfo* cert_info) override; |
| 97 void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, |
| 94 const SSLConfig& used_ssl_config, | 98 const SSLConfig& used_ssl_config, |
| 95 const SSLInfo& ssl_info) override; | 99 const ProxyInfo& used_proxy_info, |
| 96 virtual void OnNeedsProxyAuth( | 100 HttpStreamBase* stream) override; |
| 97 const HttpResponseInfo& response_info, | |
| 98 const SSLConfig& used_ssl_config, | |
| 99 const ProxyInfo& used_proxy_info, | |
| 100 HttpAuthController* auth_controller) override; | |
| 101 virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config, | |
| 102 SSLCertRequestInfo* cert_info) override; | |
| 103 virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, | |
| 104 const SSLConfig& used_ssl_config, | |
| 105 const ProxyInfo& used_proxy_info, | |
| 106 HttpStreamBase* stream) override; | |
| 107 | 101 |
| 108 private: | 102 private: |
| 109 friend class HttpNetworkTransactionSSLTest; | 103 friend class HttpNetworkTransactionSSLTest; |
| 110 | 104 |
| 111 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, | 105 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, |
| 112 ResetStateForRestart); | 106 ResetStateForRestart); |
| 113 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, | 107 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, |
| 114 WindowUpdateReceived); | 108 WindowUpdateReceived); |
| 115 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, | 109 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, |
| 116 WindowUpdateSent); | 110 WindowUpdateSent); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 332 |
| 339 BeforeNetworkStartCallback before_network_start_callback_; | 333 BeforeNetworkStartCallback before_network_start_callback_; |
| 340 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; | 334 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; |
| 341 | 335 |
| 342 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); | 336 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); |
| 343 }; | 337 }; |
| 344 | 338 |
| 345 } // namespace net | 339 } // namespace net |
| 346 | 340 |
| 347 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 341 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| OLD | NEW |