| 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 #include "net/http/http_stream_factory_impl_job.h" | 5 #include "net/http/http_stream_factory_impl_job.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "net/log/net_log_event_type.h" | 39 #include "net/log/net_log_event_type.h" |
| 40 #include "net/log/net_log_source.h" | 40 #include "net/log/net_log_source.h" |
| 41 #include "net/log/net_log_source_type.h" | 41 #include "net/log/net_log_source_type.h" |
| 42 #include "net/quic/chromium/quic_http_stream.h" | 42 #include "net/quic/chromium/quic_http_stream.h" |
| 43 #include "net/socket/client_socket_handle.h" | 43 #include "net/socket/client_socket_handle.h" |
| 44 #include "net/socket/client_socket_pool.h" | 44 #include "net/socket/client_socket_pool.h" |
| 45 #include "net/socket/client_socket_pool_manager.h" | 45 #include "net/socket/client_socket_pool_manager.h" |
| 46 #include "net/socket/socks_client_socket_pool.h" | 46 #include "net/socket/socks_client_socket_pool.h" |
| 47 #include "net/socket/ssl_client_socket.h" | 47 #include "net/socket/ssl_client_socket.h" |
| 48 #include "net/socket/ssl_client_socket_pool.h" | 48 #include "net/socket/ssl_client_socket_pool.h" |
| 49 #include "net/socket/stream_socket.h" |
| 49 #include "net/spdy/bidirectional_stream_spdy_impl.h" | 50 #include "net/spdy/bidirectional_stream_spdy_impl.h" |
| 50 #include "net/spdy/spdy_http_stream.h" | 51 #include "net/spdy/spdy_http_stream.h" |
| 51 #include "net/spdy/spdy_protocol.h" | 52 #include "net/spdy/spdy_protocol.h" |
| 52 #include "net/spdy/spdy_session.h" | 53 #include "net/spdy/spdy_session.h" |
| 53 #include "net/spdy/spdy_session_pool.h" | 54 #include "net/spdy/spdy_session_pool.h" |
| 54 #include "net/ssl/channel_id_service.h" | 55 #include "net/ssl/channel_id_service.h" |
| 55 #include "net/ssl/ssl_cert_request_info.h" | 56 #include "net/ssl/ssl_cert_request_info.h" |
| 56 #include "net/ssl/ssl_connection_status_flags.h" | 57 #include "net/ssl/ssl_connection_status_flags.h" |
| 57 #include "url/url_constants.h" | 58 #include "url/url_constants.h" |
| 58 | 59 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 328 } |
| 328 | 329 |
| 329 NextProto HttpStreamFactoryImpl::Job::negotiated_protocol() const { | 330 NextProto HttpStreamFactoryImpl::Job::negotiated_protocol() const { |
| 330 return negotiated_protocol_; | 331 return negotiated_protocol_; |
| 331 } | 332 } |
| 332 | 333 |
| 333 bool HttpStreamFactoryImpl::Job::using_spdy() const { | 334 bool HttpStreamFactoryImpl::Job::using_spdy() const { |
| 334 return using_spdy_; | 335 return using_spdy_; |
| 335 } | 336 } |
| 336 | 337 |
| 338 size_t HttpStreamFactoryImpl::Job::EstimateMemoryUsage() const { |
| 339 StreamSocket::SocketMemoryStats stats; |
| 340 if (connection_) |
| 341 connection_->DumpMemoryStats(&stats); |
| 342 return stats.total_size; |
| 343 } |
| 344 |
| 337 const SSLConfig& HttpStreamFactoryImpl::Job::server_ssl_config() const { | 345 const SSLConfig& HttpStreamFactoryImpl::Job::server_ssl_config() const { |
| 338 return server_ssl_config_; | 346 return server_ssl_config_; |
| 339 } | 347 } |
| 340 | 348 |
| 341 const SSLConfig& HttpStreamFactoryImpl::Job::proxy_ssl_config() const { | 349 const SSLConfig& HttpStreamFactoryImpl::Job::proxy_ssl_config() const { |
| 342 return proxy_ssl_config_; | 350 return proxy_ssl_config_; |
| 343 } | 351 } |
| 344 | 352 |
| 345 const ProxyInfo& HttpStreamFactoryImpl::Job::proxy_info() const { | 353 const ProxyInfo& HttpStreamFactoryImpl::Job::proxy_info() const { |
| 346 return proxy_info_; | 354 return proxy_info_; |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1505 | 1513 |
| 1506 ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 1514 ConnectionAttempts socket_attempts = connection_->connection_attempts(); |
| 1507 if (connection_->socket()) { | 1515 if (connection_->socket()) { |
| 1508 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1516 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
| 1509 } | 1517 } |
| 1510 | 1518 |
| 1511 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 1519 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); |
| 1512 } | 1520 } |
| 1513 | 1521 |
| 1514 } // namespace net | 1522 } // namespace net |
| OLD | NEW |