OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "net/base/net_log.h" | 15 #include "net/base/net_log.h" |
16 #include "net/base/request_priority.h" | 16 #include "net/base/request_priority.h" |
17 #include "net/http/http_auth.h" | 17 #include "net/http/http_auth.h" |
18 #include "net/http/http_request_headers.h" | 18 #include "net/http/http_request_headers.h" |
19 #include "net/http/http_response_info.h" | 19 #include "net/http/http_response_info.h" |
20 #include "net/http/http_stream_factory.h" | 20 #include "net/http/http_stream_factory.h" |
21 #include "net/http/http_transaction.h" | 21 #include "net/http/http_transaction.h" |
22 #include "net/proxy/proxy_service.h" | 22 #include "net/proxy/proxy_service.h" |
23 #include "net/ssl/ssl_config_service.h" | 23 #include "net/ssl/ssl_config_service.h" |
24 | 24 |
25 namespace net { | 25 namespace net { |
26 | 26 |
| 27 class ClientSocketHandle; |
27 class HttpAuthController; | 28 class HttpAuthController; |
28 class HttpNetworkSession; | 29 class HttpNetworkSession; |
29 class HttpStreamBase; | 30 class HttpStreamBase; |
30 class HttpStreamRequest; | 31 class HttpStreamRequest; |
31 class IOBuffer; | 32 class IOBuffer; |
| 33 class SpdySession; |
32 struct HttpRequestInfo; | 34 struct HttpRequestInfo; |
33 | 35 |
34 class NET_EXPORT_PRIVATE HttpNetworkTransaction | 36 class NET_EXPORT_PRIVATE HttpNetworkTransaction |
35 : public HttpTransaction, | 37 : public HttpTransaction, |
36 public HttpStreamRequest::Delegate { | 38 public HttpStreamRequest::Delegate { |
37 public: | 39 public: |
38 HttpNetworkTransaction(RequestPriority priority, | 40 HttpNetworkTransaction(RequestPriority priority, |
39 HttpNetworkSession* session); | 41 HttpNetworkSession* session); |
40 | 42 |
41 virtual ~HttpNetworkTransaction(); | 43 virtual ~HttpNetworkTransaction(); |
(...skipping 20 matching lines...) Expand all Loading... |
62 virtual LoadState GetLoadState() const OVERRIDE; | 64 virtual LoadState GetLoadState() const OVERRIDE; |
63 virtual UploadProgress GetUploadProgress() const OVERRIDE; | 65 virtual UploadProgress GetUploadProgress() const OVERRIDE; |
64 virtual bool GetLoadTimingInfo( | 66 virtual bool GetLoadTimingInfo( |
65 LoadTimingInfo* load_timing_info) const OVERRIDE; | 67 LoadTimingInfo* load_timing_info) const OVERRIDE; |
66 virtual void SetPriority(RequestPriority priority) OVERRIDE; | 68 virtual void SetPriority(RequestPriority priority) OVERRIDE; |
67 | 69 |
68 // HttpStreamRequest::Delegate methods: | 70 // HttpStreamRequest::Delegate methods: |
69 virtual void OnStreamReady(const SSLConfig& used_ssl_config, | 71 virtual void OnStreamReady(const SSLConfig& used_ssl_config, |
70 const ProxyInfo& used_proxy_info, | 72 const ProxyInfo& used_proxy_info, |
71 HttpStreamBase* stream) OVERRIDE; | 73 HttpStreamBase* stream) OVERRIDE; |
| 74 virtual void OnWebSocketStreamReady( |
| 75 const SSLConfig& used_ssl_config, |
| 76 const ProxyInfo& used_proxy_info, |
| 77 WebSocketStreamBase* stream) OVERRIDE; |
72 virtual void OnStreamFailed(int status, | 78 virtual void OnStreamFailed(int status, |
73 const SSLConfig& used_ssl_config) OVERRIDE; | 79 const SSLConfig& used_ssl_config) OVERRIDE; |
74 virtual void OnCertificateError(int status, | 80 virtual void OnCertificateError(int status, |
75 const SSLConfig& used_ssl_config, | 81 const SSLConfig& used_ssl_config, |
76 const SSLInfo& ssl_info) OVERRIDE; | 82 const SSLInfo& ssl_info) OVERRIDE; |
77 virtual void OnNeedsProxyAuth( | 83 virtual void OnNeedsProxyAuth( |
78 const HttpResponseInfo& response_info, | 84 const HttpResponseInfo& response_info, |
79 const SSLConfig& used_ssl_config, | 85 const SSLConfig& used_ssl_config, |
80 const ProxyInfo& used_proxy_info, | 86 const ProxyInfo& used_proxy_info, |
81 HttpAuthController* auth_controller) OVERRIDE; | 87 HttpAuthController* auth_controller) OVERRIDE; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 // True when the tunnel is in the process of being established - we can't | 313 // True when the tunnel is in the process of being established - we can't |
308 // read from the socket until the tunnel is done. | 314 // read from the socket until the tunnel is done. |
309 bool establishing_tunnel_; | 315 bool establishing_tunnel_; |
310 | 316 |
311 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); | 317 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); |
312 }; | 318 }; |
313 | 319 |
314 } // namespace net | 320 } // namespace net |
315 | 321 |
316 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 322 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
OLD | NEW |