| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 : public HttpTransaction, | 37 : public HttpTransaction, |
| 38 public HttpStreamRequest::Delegate { | 38 public HttpStreamRequest::Delegate { |
| 39 public: | 39 public: |
| 40 explicit HttpNetworkTransaction(HttpNetworkSession* session); | 40 explicit HttpNetworkTransaction(HttpNetworkSession* session); |
| 41 | 41 |
| 42 virtual ~HttpNetworkTransaction(); | 42 virtual ~HttpNetworkTransaction(); |
| 43 | 43 |
| 44 // HttpTransaction methods: | 44 // HttpTransaction methods: |
| 45 virtual int Start(const HttpRequestInfo* request_info, | 45 virtual int Start(const HttpRequestInfo* request_info, |
| 46 OldCompletionCallback* callback, | 46 OldCompletionCallback* callback, |
| 47 const BoundNetLog& net_log); | 47 const BoundNetLog& net_log) OVERRIDE; |
| 48 virtual int RestartIgnoringLastError(OldCompletionCallback* callback); | 48 virtual int RestartIgnoringLastError( |
| 49 OldCompletionCallback* callback) OVERRIDE; |
| 49 virtual int RestartWithCertificate(X509Certificate* client_cert, | 50 virtual int RestartWithCertificate(X509Certificate* client_cert, |
| 50 OldCompletionCallback* callback); | 51 OldCompletionCallback* callback) OVERRIDE; |
| 51 virtual int RestartWithAuth(const AuthCredentials& credentials, | 52 virtual int RestartWithAuth(const AuthCredentials& credentials, |
| 52 OldCompletionCallback* callback) OVERRIDE; | 53 OldCompletionCallback* callback) OVERRIDE; |
| 53 virtual bool IsReadyToRestartForAuth(); | 54 virtual bool IsReadyToRestartForAuth() OVERRIDE; |
| 54 | 55 |
| 55 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); | 56 virtual int Read(IOBuffer* buf, |
| 56 virtual void StopCaching() {} | 57 int buf_len, |
| 57 virtual void DoneReading() {} | 58 OldCompletionCallback* callback) OVERRIDE; |
| 58 virtual const HttpResponseInfo* GetResponseInfo() const; | 59 virtual void StopCaching() OVERRIDE {} |
| 59 virtual LoadState GetLoadState() const; | 60 virtual void DoneReading() OVERRIDE {} |
| 60 virtual uint64 GetUploadProgress() const; | 61 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; |
| 62 virtual LoadState GetLoadState() const OVERRIDE; |
| 63 virtual uint64 GetUploadProgress() const OVERRIDE; |
| 61 | 64 |
| 62 // HttpStreamRequest::Delegate methods: | 65 // HttpStreamRequest::Delegate methods: |
| 63 virtual void OnStreamReady(const SSLConfig& used_ssl_config, | 66 virtual void OnStreamReady(const SSLConfig& used_ssl_config, |
| 64 const ProxyInfo& used_proxy_info, | 67 const ProxyInfo& used_proxy_info, |
| 65 HttpStream* stream); | 68 HttpStream* stream) OVERRIDE; |
| 66 virtual void OnStreamFailed(int status, | 69 virtual void OnStreamFailed(int status, |
| 67 const SSLConfig& used_ssl_config); | 70 const SSLConfig& used_ssl_config) OVERRIDE; |
| 68 virtual void OnCertificateError(int status, | 71 virtual void OnCertificateError(int status, |
| 69 const SSLConfig& used_ssl_config, | 72 const SSLConfig& used_ssl_config, |
| 70 const SSLInfo& ssl_info); | 73 const SSLInfo& ssl_info) OVERRIDE; |
| 71 virtual void OnNeedsProxyAuth( | 74 virtual void OnNeedsProxyAuth( |
| 72 const HttpResponseInfo& response_info, | 75 const HttpResponseInfo& response_info, |
| 73 const SSLConfig& used_ssl_config, | 76 const SSLConfig& used_ssl_config, |
| 74 const ProxyInfo& used_proxy_info, | 77 const ProxyInfo& used_proxy_info, |
| 75 HttpAuthController* auth_controller); | 78 HttpAuthController* auth_controller) OVERRIDE; |
| 76 virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config, | 79 virtual void OnNeedsClientAuth(const SSLConfig& used_ssl_config, |
| 77 SSLCertRequestInfo* cert_info); | 80 SSLCertRequestInfo* cert_info) OVERRIDE; |
| 78 virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, | 81 virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, |
| 79 const SSLConfig& used_ssl_config, | 82 const SSLConfig& used_ssl_config, |
| 80 const ProxyInfo& used_proxy_info, | 83 const ProxyInfo& used_proxy_info, |
| 81 HttpStream* stream); | 84 HttpStream* stream) OVERRIDE; |
| 82 | 85 |
| 83 private: | 86 private: |
| 84 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, ResetStateForRestart); | 87 FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, ResetStateForRestart); |
| 85 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateReceived); | 88 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateReceived); |
| 86 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateSent); | 89 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateSent); |
| 87 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateOverflow); | 90 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateOverflow); |
| 88 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume); | 91 FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume); |
| 89 | 92 |
| 90 enum State { | 93 enum State { |
| 91 STATE_CREATE_STREAM, | 94 STATE_CREATE_STREAM, |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // True when the tunnel is in the process of being established - we can't | 274 // True when the tunnel is in the process of being established - we can't |
| 272 // read from the socket until the tunnel is done. | 275 // read from the socket until the tunnel is done. |
| 273 bool establishing_tunnel_; | 276 bool establishing_tunnel_; |
| 274 | 277 |
| 275 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); | 278 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); |
| 276 }; | 279 }; |
| 277 | 280 |
| 278 } // namespace net | 281 } // namespace net |
| 279 | 282 |
| 280 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 283 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| OLD | NEW |