| 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> |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 enum ProxyMode { | 259 enum ProxyMode { |
| 260 kDirectConnection, // If using a direct connection | 260 kDirectConnection, // If using a direct connection |
| 261 kTunnelProxy, // If using a tunnel (CONNECT method as HTTPS) | 261 kTunnelProxy, // If using a tunnel (CONNECT method as HTTPS) |
| 262 kSOCKSProxy, // If using a SOCKS proxy | 262 kSOCKSProxy, // If using a SOCKS proxy |
| 263 }; | 263 }; |
| 264 | 264 |
| 265 // Use the same number as HttpNetworkTransaction::kMaxHeaderBufSize. | 265 // Use the same number as HttpNetworkTransaction::kMaxHeaderBufSize. |
| 266 enum { kMaxTunnelResponseHeadersSize = 32768 }; // 32 kilobytes. | 266 enum { kMaxTunnelResponseHeadersSize = 32768 }; // 32 kilobytes. |
| 267 | 267 |
| 268 // Copies the given addrinfo list in |addresses_|. | |
| 269 // Used for WebSocketThrottleTest. | 268 // Used for WebSocketThrottleTest. |
| 270 void CopyAddrInfo(struct addrinfo* head); | 269 void set_addresses(const AddressList& addresses); |
| 271 | 270 |
| 272 void DoClose(); | 271 void DoClose(); |
| 273 | 272 |
| 274 // Finishes the job. | 273 // Finishes the job. |
| 275 // Calls OnError and OnClose of delegate, and no more | 274 // Calls OnError and OnClose of delegate, and no more |
| 276 // notifications will be sent to delegate. | 275 // notifications will be sent to delegate. |
| 277 void Finish(int result); | 276 void Finish(int result); |
| 278 | 277 |
| 279 int DidEstablishSSL(int result, SSLConfig* ssl_config); | 278 int DidEstablishSSL(int result, SSLConfig* ssl_config); |
| 280 int DidEstablishConnection(); | 279 int DidEstablishConnection(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 bool server_closed_; | 377 bool server_closed_; |
| 379 | 378 |
| 380 scoped_ptr<SocketStreamMetrics> metrics_; | 379 scoped_ptr<SocketStreamMetrics> metrics_; |
| 381 | 380 |
| 382 DISALLOW_COPY_AND_ASSIGN(SocketStream); | 381 DISALLOW_COPY_AND_ASSIGN(SocketStream); |
| 383 }; | 382 }; |
| 384 | 383 |
| 385 } // namespace net | 384 } // namespace net |
| 386 | 385 |
| 387 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ | 386 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ |
| OLD | NEW |