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_SOCKET_STREAM_SOCKET_STREAM_H_ | 5 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_H_ |
6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_ | 6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "net/base/address_list.h" | 16 #include "net/base/address_list.h" |
17 #include "net/base/completion_callback.h" | 17 #include "net/base/completion_callback.h" |
18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
19 #include "net/base/net_export.h" | 19 #include "net/base/net_export.h" |
20 #include "net/base/net_log.h" | 20 #include "net/base/net_log.h" |
21 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
22 #include "net/base/ssl_config_service.h" | 22 #include "net/base/ssl_config_service.h" |
23 #include "net/http/http_auth.h" | 23 #include "net/http/http_auth.h" |
24 #include "net/http/http_auth_cache.h" | 24 #include "net/http/http_auth_cache.h" |
25 #include "net/http/http_auth_handler.h" | 25 #include "net/http/http_auth_handler.h" |
26 #include "net/proxy/proxy_service.h" | 26 #include "net/proxy/proxy_service.h" |
27 #include "net/socket/tcp_client_socket.h" | 27 #include "net/socket/tcp_client_socket.h" |
| 28 #include "net/url_request/url_request.h" |
28 #include "net/url_request/url_request_context.h" | 29 #include "net/url_request/url_request_context.h" |
29 | 30 |
30 namespace net { | 31 namespace net { |
31 | 32 |
32 class AuthChallengeInfo; | 33 class AuthChallengeInfo; |
33 class ClientSocketFactory; | 34 class ClientSocketFactory; |
34 class CookieOptions; | 35 class CookieOptions; |
35 class HostResolver; | 36 class HostResolver; |
36 class HttpAuthHandlerFactory; | 37 class HttpAuthHandlerFactory; |
37 class SSLConfigService; | 38 class SSLConfigService; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 void Realloc(size_t new_size); | 225 void Realloc(size_t new_size); |
225 | 226 |
226 private: | 227 private: |
227 virtual ~ResponseHeaders(); | 228 virtual ~ResponseHeaders(); |
228 | 229 |
229 scoped_ptr_malloc<char> headers_; | 230 scoped_ptr_malloc<char> headers_; |
230 }; | 231 }; |
231 | 232 |
232 enum State { | 233 enum State { |
233 STATE_NONE, | 234 STATE_NONE, |
| 235 STATE_BEFORE_CONNECT, |
| 236 STATE_BEFORE_CONNECT_COMPLETE, |
234 STATE_RESOLVE_PROXY, | 237 STATE_RESOLVE_PROXY, |
235 STATE_RESOLVE_PROXY_COMPLETE, | 238 STATE_RESOLVE_PROXY_COMPLETE, |
236 STATE_RESOLVE_HOST, | 239 STATE_RESOLVE_HOST, |
237 STATE_RESOLVE_HOST_COMPLETE, | 240 STATE_RESOLVE_HOST_COMPLETE, |
238 STATE_RESOLVE_PROTOCOL, | 241 STATE_RESOLVE_PROTOCOL, |
239 STATE_RESOLVE_PROTOCOL_COMPLETE, | 242 STATE_RESOLVE_PROTOCOL_COMPLETE, |
240 STATE_TCP_CONNECT, | 243 STATE_TCP_CONNECT, |
241 STATE_TCP_CONNECT_COMPLETE, | 244 STATE_TCP_CONNECT_COMPLETE, |
242 STATE_WRITE_TUNNEL_HEADERS, | 245 STATE_WRITE_TUNNEL_HEADERS, |
243 STATE_WRITE_TUNNEL_HEADERS_COMPLETE, | 246 STATE_WRITE_TUNNEL_HEADERS_COMPLETE, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 int DidEstablishConnection(); | 283 int DidEstablishConnection(); |
281 int DidReceiveData(int result); | 284 int DidReceiveData(int result); |
282 int DidSendData(int result); | 285 int DidSendData(int result); |
283 | 286 |
284 void OnIOCompleted(int result); | 287 void OnIOCompleted(int result); |
285 void OnReadCompleted(int result); | 288 void OnReadCompleted(int result); |
286 void OnWriteCompleted(int result); | 289 void OnWriteCompleted(int result); |
287 | 290 |
288 void DoLoop(int result); | 291 void DoLoop(int result); |
289 | 292 |
| 293 int DoBeforeConnect(); |
| 294 int DoBeforeConnectComplete(int result); |
290 int DoResolveProxy(); | 295 int DoResolveProxy(); |
291 int DoResolveProxyComplete(int result); | 296 int DoResolveProxyComplete(int result); |
292 int DoResolveHost(); | 297 int DoResolveHost(); |
293 int DoResolveHostComplete(int result); | 298 int DoResolveHostComplete(int result); |
294 int DoResolveProtocol(int result); | 299 int DoResolveProtocol(int result); |
295 int DoResolveProtocolComplete(int result); | 300 int DoResolveProtocolComplete(int result); |
296 int DoTcpConnect(int result); | 301 int DoTcpConnect(int result); |
297 int DoTcpConnectComplete(int result); | 302 int DoTcpConnectComplete(int result); |
298 int DoWriteTunnelHeaders(); | 303 int DoWriteTunnelHeaders(); |
299 int DoWriteTunnelHeadersComplete(int result); | 304 int DoWriteTunnelHeadersComplete(int result); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 bool server_closed_; | 388 bool server_closed_; |
384 | 389 |
385 scoped_ptr<SocketStreamMetrics> metrics_; | 390 scoped_ptr<SocketStreamMetrics> metrics_; |
386 | 391 |
387 DISALLOW_COPY_AND_ASSIGN(SocketStream); | 392 DISALLOW_COPY_AND_ASSIGN(SocketStream); |
388 }; | 393 }; |
389 | 394 |
390 } // namespace net | 395 } // namespace net |
391 | 396 |
392 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ | 397 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ |
OLD | NEW |