| 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_STREAM_REQUEST_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_REQUEST_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_REQUEST_H_ | 6 #define NET_HTTP_HTTP_STREAM_REQUEST_H_ |
| 7 | 7 |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "net/base/completion_callback.h" | 9 #include "net/base/completion_callback.h" |
| 10 #include "net/base/host_mapping_rules.h" | 10 #include "net/base/host_mapping_rules.h" |
| 11 #include "net/base/ssl_config_service.h" | 11 #include "net/base/ssl_config_service.h" |
| 12 #include "net/http/http_auth.h" | 12 #include "net/http/http_auth.h" |
| 13 #include "net/http/http_auth_controller.h" | 13 #include "net/http/http_auth_controller.h" |
| 14 #include "net/http/http_alternate_protocols.h" | 14 #include "net/http/http_alternate_protocols.h" |
| 15 #include "net/http/http_stream_factory.h" | 15 #include "net/http/http_stream_factory.h" |
| 16 #include "net/http/stream_factory.h" | 16 #include "net/http/stream_factory.h" |
| 17 #include "net/proxy/proxy_service.h" | 17 #include "net/proxy/proxy_service.h" |
| 18 #include "net/socket/client_socket_handle.h" | 18 #include "net/socket/client_socket_handle.h" |
| 19 | 19 |
| 20 namespace net { | 20 namespace net { |
| 21 | 21 |
| 22 class ClientSocketHandle; | 22 class ClientSocketHandle; |
| 23 class HttpAuthController; | 23 class HttpAuthController; |
| 24 class HttpNetworkSession; | 24 class HttpNetworkSession; |
| 25 class HttpProxySocketParams; |
| 25 class HttpStreamFactory; | 26 class HttpStreamFactory; |
| 27 class SOCKSSocketParams; |
| 28 class SSLSocketParams; |
| 26 class StreamRequestDelegate; | 29 class StreamRequestDelegate; |
| 30 class TCPSocketParams; |
| 27 | 31 |
| 28 // An HttpStreamRequest exists for each stream which is in progress of being | 32 // An HttpStreamRequest exists for each stream which is in progress of being |
| 29 // created for the StreamFactory. | 33 // created for the StreamFactory. |
| 30 class HttpStreamRequest : public StreamFactory::StreamRequestJob { | 34 class HttpStreamRequest : public StreamFactory::StreamRequestJob { |
| 31 public: | 35 public: |
| 32 HttpStreamRequest(HttpStreamFactory* factory, | 36 HttpStreamRequest(HttpStreamFactory* factory, |
| 33 const scoped_refptr<HttpNetworkSession>& session); | 37 const scoped_refptr<HttpNetworkSession>& session); |
| 34 virtual ~HttpStreamRequest(); | 38 virtual ~HttpStreamRequest(); |
| 35 | 39 |
| 36 // StreamRequest interface | 40 // StreamRequest interface |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 int DoResolveProxy(); | 103 int DoResolveProxy(); |
| 100 int DoResolveProxyComplete(int result); | 104 int DoResolveProxyComplete(int result); |
| 101 int DoInitConnection(); | 105 int DoInitConnection(); |
| 102 int DoInitConnectionComplete(int result); | 106 int DoInitConnectionComplete(int result); |
| 103 int DoWaitingUserAction(int result); | 107 int DoWaitingUserAction(int result); |
| 104 int DoInitStream(); | 108 int DoInitStream(); |
| 105 int DoInitStreamComplete(int result); | 109 int DoInitStreamComplete(int result); |
| 106 int DoRestartTunnelAuth(); | 110 int DoRestartTunnelAuth(); |
| 107 int DoRestartTunnelAuthComplete(int result); | 111 int DoRestartTunnelAuthComplete(int result); |
| 108 | 112 |
| 113 // Returns a newly create SSLSocketParams, and sets several |
| 114 // fields of ssl_config_. |
| 115 scoped_refptr<SSLSocketParams> GenerateSslParams( |
| 116 scoped_refptr<TCPSocketParams> tcp_params, |
| 117 scoped_refptr<HttpProxySocketParams> http_proxy_params, |
| 118 scoped_refptr<SOCKSSocketParams> socks_params, |
| 119 ProxyServer::Scheme proxy_scheme, |
| 120 bool want_spdy_over_npn); |
| 121 |
| 109 // AlternateProtocol API | 122 // AlternateProtocol API |
| 110 void MarkBrokenAlternateProtocolAndFallback(); | 123 void MarkBrokenAlternateProtocolAndFallback(); |
| 111 | 124 |
| 112 // Retrieve SSLInfo from our SSL Socket. | 125 // Retrieve SSLInfo from our SSL Socket. |
| 113 // This must only be called when we are using an SSLSocket. | 126 // This must only be called when we are using an SSLSocket. |
| 114 // After calling, the caller can use ssl_info_. | 127 // After calling, the caller can use ssl_info_. |
| 115 void GetSSLInfo(); | 128 void GetSSLInfo(); |
| 116 | 129 |
| 117 // Called when we encounter a network error that could be resolved by trying | 130 // Called when we encounter a network error that could be resolved by trying |
| 118 // a new proxy configuration. If there is another proxy configuration to try | 131 // a new proxy configuration. If there is another proxy configuration to try |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // can no longer be touched (as they belong to the requestor). | 209 // can no longer be touched (as they belong to the requestor). |
| 197 bool cancelled_; | 210 bool cancelled_; |
| 198 | 211 |
| 199 DISALLOW_COPY_AND_ASSIGN(HttpStreamRequest); | 212 DISALLOW_COPY_AND_ASSIGN(HttpStreamRequest); |
| 200 }; | 213 }; |
| 201 | 214 |
| 202 } // namespace net | 215 } // namespace net |
| 203 | 216 |
| 204 #endif // NET_HTTP_HTTP_STREAM_REQUEST_H_ | 217 #endif // NET_HTTP_HTTP_STREAM_REQUEST_H_ |
| 205 | 218 |
| OLD | NEW |