| 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 25 matching lines...) Expand all Loading... |
| 36 class NET_EXPORT_PRIVATE HttpNetworkTransaction | 36 class NET_EXPORT_PRIVATE HttpNetworkTransaction |
| 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 const CompletionCallback& callback, |
| 47 const BoundNetLog& net_log) OVERRIDE; | 47 const BoundNetLog& net_log) OVERRIDE; |
| 48 virtual int RestartIgnoringLastError( | 48 virtual int RestartIgnoringLastError( |
| 49 OldCompletionCallback* callback) OVERRIDE; | 49 const CompletionCallback& callback) OVERRIDE; |
| 50 virtual int RestartWithCertificate(X509Certificate* client_cert, | 50 virtual int RestartWithCertificate( |
| 51 OldCompletionCallback* callback) OVERRIDE; | 51 X509Certificate* client_cert, |
| 52 const CompletionCallback& callback) OVERRIDE; |
| 52 virtual int RestartWithAuth(const AuthCredentials& credentials, | 53 virtual int RestartWithAuth(const AuthCredentials& credentials, |
| 53 OldCompletionCallback* callback) OVERRIDE; | 54 const CompletionCallback& callback) OVERRIDE; |
| 54 virtual bool IsReadyToRestartForAuth() OVERRIDE; | 55 virtual bool IsReadyToRestartForAuth() OVERRIDE; |
| 55 | 56 |
| 56 virtual int Read(IOBuffer* buf, | 57 virtual int Read(IOBuffer* buf, |
| 57 int buf_len, | 58 int buf_len, |
| 58 OldCompletionCallback* callback) OVERRIDE; | 59 const CompletionCallback& callback) OVERRIDE; |
| 59 virtual void StopCaching() OVERRIDE {} | 60 virtual void StopCaching() OVERRIDE {} |
| 60 virtual void DoneReading() OVERRIDE {} | 61 virtual void DoneReading() OVERRIDE {} |
| 61 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; | 62 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; |
| 62 virtual LoadState GetLoadState() const OVERRIDE; | 63 virtual LoadState GetLoadState() const OVERRIDE; |
| 63 virtual uint64 GetUploadProgress() const OVERRIDE; | 64 virtual uint64 GetUploadProgress() const OVERRIDE; |
| 64 | 65 |
| 65 // HttpStreamRequest::Delegate methods: | 66 // HttpStreamRequest::Delegate methods: |
| 66 virtual void OnStreamReady(const SSLConfig& used_ssl_config, | 67 virtual void OnStreamReady(const SSLConfig& used_ssl_config, |
| 67 const ProxyInfo& used_proxy_info, | 68 const ProxyInfo& used_proxy_info, |
| 68 HttpStream* stream) OVERRIDE; | 69 HttpStream* stream) OVERRIDE; |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 static std::string DescribeState(State state); | 221 static std::string DescribeState(State state); |
| 221 | 222 |
| 222 scoped_refptr<HttpAuthController> | 223 scoped_refptr<HttpAuthController> |
| 223 auth_controllers_[HttpAuth::AUTH_NUM_TARGETS]; | 224 auth_controllers_[HttpAuth::AUTH_NUM_TARGETS]; |
| 224 | 225 |
| 225 // Whether this transaction is waiting for proxy auth, server auth, or is | 226 // Whether this transaction is waiting for proxy auth, server auth, or is |
| 226 // not waiting for any auth at all. |pending_auth_target_| is read and | 227 // not waiting for any auth at all. |pending_auth_target_| is read and |
| 227 // cleared by RestartWithAuth(). | 228 // cleared by RestartWithAuth(). |
| 228 HttpAuth::Target pending_auth_target_; | 229 HttpAuth::Target pending_auth_target_; |
| 229 | 230 |
| 230 OldCompletionCallbackImpl<HttpNetworkTransaction> io_callback_; | 231 CompletionCallback io_callback_; |
| 231 OldCompletionCallback* user_callback_; | 232 CompletionCallback callback_; |
| 232 scoped_ptr<UploadDataStream> request_body_; | 233 scoped_ptr<UploadDataStream> request_body_; |
| 233 | 234 |
| 234 scoped_refptr<HttpNetworkSession> session_; | 235 scoped_refptr<HttpNetworkSession> session_; |
| 235 | 236 |
| 236 BoundNetLog net_log_; | 237 BoundNetLog net_log_; |
| 237 const HttpRequestInfo* request_; | 238 const HttpRequestInfo* request_; |
| 238 HttpResponseInfo response_; | 239 HttpResponseInfo response_; |
| 239 | 240 |
| 240 // |proxy_info_| is the ProxyInfo used by the HttpStreamRequest. | 241 // |proxy_info_| is the ProxyInfo used by the HttpStreamRequest. |
| 241 ProxyInfo proxy_info_; | 242 ProxyInfo proxy_info_; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // True when the tunnel is in the process of being established - we can't | 275 // True when the tunnel is in the process of being established - we can't |
| 275 // read from the socket until the tunnel is done. | 276 // read from the socket until the tunnel is done. |
| 276 bool establishing_tunnel_; | 277 bool establishing_tunnel_; |
| 277 | 278 |
| 278 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); | 279 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); |
| 279 }; | 280 }; |
| 280 | 281 |
| 281 } // namespace net | 282 } // namespace net |
| 282 | 283 |
| 283 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 284 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| OLD | NEW |