| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 12 matching lines...) Expand all Loading... |
| 23 #include "net/proxy/proxy_service.h" | 23 #include "net/proxy/proxy_service.h" |
| 24 | 24 |
| 25 namespace net { | 25 namespace net { |
| 26 | 26 |
| 27 class ClientSocketHandle; | 27 class ClientSocketHandle; |
| 28 class HttpAuthController; | 28 class HttpAuthController; |
| 29 class HttpNetworkSession; | 29 class HttpNetworkSession; |
| 30 class HttpStream; | 30 class HttpStream; |
| 31 class HttpStreamRequest; | 31 class HttpStreamRequest; |
| 32 class IOBuffer; | 32 class IOBuffer; |
| 33 class SSLHostInfo; | |
| 34 struct HttpRequestInfo; | 33 struct HttpRequestInfo; |
| 35 | 34 |
| 36 class HttpNetworkTransaction : public HttpTransaction, | 35 class HttpNetworkTransaction : public HttpTransaction, |
| 37 public StreamFactory::StreamRequestDelegate { | 36 public StreamFactory::StreamRequestDelegate { |
| 38 public: | 37 public: |
| 39 explicit HttpNetworkTransaction(HttpNetworkSession* session); | 38 explicit HttpNetworkTransaction(HttpNetworkSession* session); |
| 40 | 39 |
| 41 virtual ~HttpNetworkTransaction(); | 40 virtual ~HttpNetworkTransaction(); |
| 42 | 41 |
| 43 // HttpTransaction methods: | 42 // HttpTransaction methods: |
| 44 virtual int Start(const HttpRequestInfo* request_info, | 43 virtual int Start(const HttpRequestInfo* request_info, |
| 45 CompletionCallback* callback, | 44 CompletionCallback* callback, |
| 46 const BoundNetLog& net_log); | 45 const BoundNetLog& net_log); |
| 47 virtual int RestartIgnoringLastError(CompletionCallback* callback); | 46 virtual int RestartIgnoringLastError(CompletionCallback* callback); |
| 48 virtual int RestartWithCertificate(X509Certificate* client_cert, | 47 virtual int RestartWithCertificate(X509Certificate* client_cert, |
| 49 CompletionCallback* callback); | 48 CompletionCallback* callback); |
| 50 virtual int RestartWithAuth(const string16& username, | 49 virtual int RestartWithAuth(const string16& username, |
| 51 const string16& password, | 50 const string16& password, |
| 52 CompletionCallback* callback); | 51 CompletionCallback* callback); |
| 53 virtual bool IsReadyToRestartForAuth(); | 52 virtual bool IsReadyToRestartForAuth(); |
| 54 | 53 |
| 55 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 54 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
| 56 virtual void StopCaching() {} | 55 virtual void StopCaching() {} |
| 57 virtual const HttpResponseInfo* GetResponseInfo() const; | 56 virtual const HttpResponseInfo* GetResponseInfo() const; |
| 58 virtual LoadState GetLoadState() const; | 57 virtual LoadState GetLoadState() const; |
| 59 virtual uint64 GetUploadProgress() const; | 58 virtual uint64 GetUploadProgress() const; |
| 60 virtual void SetSSLHostInfo(SSLHostInfo* host_info); | |
| 61 | 59 |
| 62 // StreamRequestDelegate methods: | 60 // StreamRequestDelegate methods: |
| 63 virtual void OnStreamReady(HttpStream* stream); | 61 virtual void OnStreamReady(HttpStream* stream); |
| 64 virtual void OnStreamFailed(int status); | 62 virtual void OnStreamFailed(int status); |
| 65 virtual void OnCertificateError(int status, const SSLInfo& ssl_info); | 63 virtual void OnCertificateError(int status, const SSLInfo& ssl_info); |
| 66 virtual void OnNeedsProxyAuth( | 64 virtual void OnNeedsProxyAuth( |
| 67 const HttpResponseInfo& response_info, | 65 const HttpResponseInfo& response_info, |
| 68 HttpAuthController* auth_controller); | 66 HttpAuthController* auth_controller); |
| 69 virtual void OnNeedsClientAuth(SSLCertRequestInfo* cert_info); | 67 virtual void OnNeedsClientAuth(SSLCertRequestInfo* cert_info); |
| 70 | 68 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 bool establishing_tunnel_; | 245 bool establishing_tunnel_; |
| 248 | 246 |
| 249 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); | 247 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); |
| 250 }; | 248 }; |
| 251 | 249 |
| 252 int ConvertRequestPriorityToSpdyPriority(RequestPriority priority); | 250 int ConvertRequestPriorityToSpdyPriority(RequestPriority priority); |
| 253 | 251 |
| 254 } // namespace net | 252 } // namespace net |
| 255 | 253 |
| 256 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 254 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| OLD | NEW |