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