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 // TODO(ukai): code is similar with http_network_transaction.cc. We should | 5 // TODO(ukai): code is similar with http_network_transaction.cc. We should |
6 // think about ways to share code, if possible. | 6 // think about ways to share code, if possible. |
7 | 7 |
8 #include "net/socket_stream/socket_stream.h" | 8 #include "net/socket_stream/socket_stream.h" |
9 | 9 |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/bind_helpers.h" | 15 #include "base/bind_helpers.h" |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/message_loop.h" | 18 #include "base/message_loop.h" |
19 #include "base/string_util.h" | 19 #include "base/string_util.h" |
20 #include "base/stringprintf.h" | 20 #include "base/stringprintf.h" |
21 #include "base/utf_string_conversions.h" | 21 #include "base/utf_string_conversions.h" |
22 #include "net/base/auth.h" | 22 #include "net/base/auth.h" |
23 #include "net/base/host_resolver.h" | 23 #include "net/base/host_resolver.h" |
24 #include "net/base/io_buffer.h" | 24 #include "net/base/io_buffer.h" |
25 #include "net/base/net_errors.h" | 25 #include "net/base/net_errors.h" |
26 #include "net/base/net_util.h" | 26 #include "net/base/net_util.h" |
27 #include "net/base/ssl_cert_request_info.h" | |
28 #include "net/base/ssl_info.h" | |
29 #include "net/http/http_auth_controller.h" | 27 #include "net/http/http_auth_controller.h" |
30 #include "net/http/http_network_session.h" | 28 #include "net/http/http_network_session.h" |
31 #include "net/http/http_request_headers.h" | 29 #include "net/http/http_request_headers.h" |
32 #include "net/http/http_request_info.h" | 30 #include "net/http/http_request_info.h" |
33 #include "net/http/http_response_headers.h" | 31 #include "net/http/http_response_headers.h" |
34 #include "net/http/http_stream_factory.h" | 32 #include "net/http/http_stream_factory.h" |
35 #include "net/http/http_transaction_factory.h" | 33 #include "net/http/http_transaction_factory.h" |
36 #include "net/http/http_util.h" | 34 #include "net/http/http_util.h" |
37 #include "net/socket/client_socket_factory.h" | 35 #include "net/socket/client_socket_factory.h" |
38 #include "net/socket/socks5_client_socket.h" | 36 #include "net/socket/socks5_client_socket.h" |
39 #include "net/socket/socks_client_socket.h" | 37 #include "net/socket/socks_client_socket.h" |
40 #include "net/socket/ssl_client_socket.h" | 38 #include "net/socket/ssl_client_socket.h" |
41 #include "net/socket/tcp_client_socket.h" | 39 #include "net/socket/tcp_client_socket.h" |
42 #include "net/socket_stream/socket_stream_metrics.h" | 40 #include "net/socket_stream/socket_stream_metrics.h" |
| 41 #include "net/ssl/ssl_cert_request_info.h" |
| 42 #include "net/ssl/ssl_info.h" |
43 #include "net/url_request/url_request.h" | 43 #include "net/url_request/url_request.h" |
44 #include "net/url_request/url_request_context.h" | 44 #include "net/url_request/url_request_context.h" |
45 | 45 |
46 static const int kMaxPendingSendAllowed = 32768; // 32 kilobytes. | 46 static const int kMaxPendingSendAllowed = 32768; // 32 kilobytes. |
47 static const int kReadBufferSize = 4096; | 47 static const int kReadBufferSize = 4096; |
48 | 48 |
49 namespace net { | 49 namespace net { |
50 | 50 |
51 int SocketStream::Delegate::OnStartOpenConnection( | 51 int SocketStream::Delegate::OnStartOpenConnection( |
52 SocketStream* socket, const CompletionCallback& callback) { | 52 SocketStream* socket, const CompletionCallback& callback) { |
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 | 1278 |
1279 SSLConfigService* SocketStream::ssl_config_service() const { | 1279 SSLConfigService* SocketStream::ssl_config_service() const { |
1280 return context_->ssl_config_service(); | 1280 return context_->ssl_config_service(); |
1281 } | 1281 } |
1282 | 1282 |
1283 ProxyService* SocketStream::proxy_service() const { | 1283 ProxyService* SocketStream::proxy_service() const { |
1284 return context_->proxy_service(); | 1284 return context_->proxy_service(); |
1285 } | 1285 } |
1286 | 1286 |
1287 } // namespace net | 1287 } // namespace net |
OLD | NEW |