| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/ref_counted.h" | 10 #include "base/ref_counted.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 class UploadDataStream; | 34 class UploadDataStream; |
| 35 | 35 |
| 36 class HttpNetworkTransaction : public HttpTransaction { | 36 class HttpNetworkTransaction : public HttpTransaction { |
| 37 public: | 37 public: |
| 38 HttpNetworkTransaction(HttpNetworkSession* session, | 38 HttpNetworkTransaction(HttpNetworkSession* session, |
| 39 ClientSocketFactory* socket_factory); | 39 ClientSocketFactory* socket_factory); |
| 40 | 40 |
| 41 virtual ~HttpNetworkTransaction(); | 41 virtual ~HttpNetworkTransaction(); |
| 42 | 42 |
| 43 // HttpTransaction methods: | 43 // HttpTransaction methods: |
| 44 virtual int Start(const HttpRequestInfo* request_info, | 44 virtual int Start(LoadLog* load_log, |
| 45 const HttpRequestInfo* request_info, |
| 45 CompletionCallback* callback); | 46 CompletionCallback* callback); |
| 46 virtual int RestartIgnoringLastError(CompletionCallback* callback); | 47 virtual int RestartIgnoringLastError(CompletionCallback* callback); |
| 47 virtual int RestartWithCertificate(X509Certificate* client_cert, | 48 virtual int RestartWithCertificate(X509Certificate* client_cert, |
| 48 CompletionCallback* callback); | 49 CompletionCallback* callback); |
| 49 virtual int RestartWithAuth(const std::wstring& username, | 50 virtual int RestartWithAuth(const std::wstring& username, |
| 50 const std::wstring& password, | 51 const std::wstring& password, |
| 51 CompletionCallback* callback); | 52 CompletionCallback* callback); |
| 52 virtual bool IsReadyToRestartForAuth() { | 53 virtual bool IsReadyToRestartForAuth() { |
| 53 return pending_auth_target_ != HttpAuth::AUTH_NONE && | 54 return pending_auth_target_ != HttpAuth::AUTH_NONE && |
| 54 HaveAuth(pending_auth_target_); | 55 HaveAuth(pending_auth_target_); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 // Whether this transaction is waiting for proxy auth, server auth, or is | 296 // Whether this transaction is waiting for proxy auth, server auth, or is |
| 296 // not waiting for any auth at all. |pending_auth_target_| is read and | 297 // not waiting for any auth at all. |pending_auth_target_| is read and |
| 297 // cleared by RestartWithAuth(). | 298 // cleared by RestartWithAuth(). |
| 298 HttpAuth::Target pending_auth_target_; | 299 HttpAuth::Target pending_auth_target_; |
| 299 | 300 |
| 300 CompletionCallbackImpl<HttpNetworkTransaction> io_callback_; | 301 CompletionCallbackImpl<HttpNetworkTransaction> io_callback_; |
| 301 CompletionCallback* user_callback_; | 302 CompletionCallback* user_callback_; |
| 302 | 303 |
| 303 scoped_refptr<HttpNetworkSession> session_; | 304 scoped_refptr<HttpNetworkSession> session_; |
| 304 | 305 |
| 306 scoped_refptr<LoadLog> load_log_; |
| 305 const HttpRequestInfo* request_; | 307 const HttpRequestInfo* request_; |
| 306 HttpResponseInfo response_; | 308 HttpResponseInfo response_; |
| 307 | 309 |
| 308 ProxyService::PacRequest* pac_request_; | 310 ProxyService::PacRequest* pac_request_; |
| 309 ProxyInfo proxy_info_; | 311 ProxyInfo proxy_info_; |
| 310 | 312 |
| 311 ClientSocketFactory* socket_factory_; | 313 ClientSocketFactory* socket_factory_; |
| 312 ClientSocketHandle connection_; | 314 ClientSocketHandle connection_; |
| 313 scoped_ptr<HttpStream> http_stream_; | 315 scoped_ptr<HttpStream> http_stream_; |
| 314 bool reused_socket_; | 316 bool reused_socket_; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 // The time that we request the ClientSocketPool for a connected socket. | 399 // The time that we request the ClientSocketPool for a connected socket. |
| 398 base::TimeTicks transport_socket_request_time_; | 400 base::TimeTicks transport_socket_request_time_; |
| 399 | 401 |
| 400 // The next state in the state machine. | 402 // The next state in the state machine. |
| 401 State next_state_; | 403 State next_state_; |
| 402 }; | 404 }; |
| 403 | 405 |
| 404 } // namespace net | 406 } // namespace net |
| 405 | 407 |
| 406 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 408 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| OLD | NEW |