| 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_network_session.h" | 5 #include "net/http/http_network_session.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/debug/stack_trace.h" | 11 #include "base/debug/stack_trace.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/memory_coordinator_client_registry.h" | 13 #include "base/memory/memory_coordinator_client_registry.h" |
| 14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 15 #include "base/profiler/scoped_tracker.h" | 15 #include "base/profiler/scoped_tracker.h" |
| 16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 18 #include "base/values.h" | 18 #include "base/values.h" |
| 19 #include "net/base/network_throttle_manager_impl.h" | 19 #include "net/base/network_throttle_manager.h" |
| 20 #include "net/http/http_auth_handler_factory.h" | 20 #include "net/http/http_auth_handler_factory.h" |
| 21 #include "net/http/http_response_body_drainer.h" | 21 #include "net/http/http_response_body_drainer.h" |
| 22 #include "net/http/http_stream_factory_impl.h" | 22 #include "net/http/http_stream_factory_impl.h" |
| 23 #include "net/http/url_security_manager.h" | 23 #include "net/http/url_security_manager.h" |
| 24 #include "net/proxy/proxy_service.h" | 24 #include "net/proxy/proxy_service.h" |
| 25 #include "net/quic/chromium/quic_stream_factory.h" | 25 #include "net/quic/chromium/quic_stream_factory.h" |
| 26 #include "net/quic/core/crypto/quic_random.h" | 26 #include "net/quic/core/crypto/quic_random.h" |
| 27 #include "net/quic/core/quic_clock.h" | 27 #include "net/quic/core/quic_clock.h" |
| 28 #include "net/quic/core/quic_crypto_client_stream_factory.h" | 28 #include "net/quic/core/quic_crypto_client_stream_factory.h" |
| 29 #include "net/quic/core/quic_protocol.h" | 29 #include "net/quic/core/quic_protocol.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 params.ssl_config_service, | 192 params.ssl_config_service, |
| 193 params.http_server_properties, | 193 params.http_server_properties, |
| 194 params.transport_security_state, | 194 params.transport_security_state, |
| 195 params.enable_spdy_ping_based_connection_checking, | 195 params.enable_spdy_ping_based_connection_checking, |
| 196 params.spdy_session_max_recv_window_size, | 196 params.spdy_session_max_recv_window_size, |
| 197 params.spdy_stream_max_recv_window_size, | 197 params.spdy_stream_max_recv_window_size, |
| 198 params.time_func, | 198 params.time_func, |
| 199 params.proxy_delegate), | 199 params.proxy_delegate), |
| 200 http_stream_factory_(new HttpStreamFactoryImpl(this, false)), | 200 http_stream_factory_(new HttpStreamFactoryImpl(this, false)), |
| 201 http_stream_factory_for_websocket_(new HttpStreamFactoryImpl(this, true)), | 201 http_stream_factory_for_websocket_(new HttpStreamFactoryImpl(this, true)), |
| 202 network_stream_throttler_(new NetworkThrottleManagerImpl()), | 202 network_stream_throttler_(NetworkThrottleManager::CreateThrottler()), |
| 203 params_(params) { | 203 params_(params) { |
| 204 DCHECK(proxy_service_); | 204 DCHECK(proxy_service_); |
| 205 DCHECK(ssl_config_service_.get()); | 205 DCHECK(ssl_config_service_.get()); |
| 206 CHECK(http_server_properties_); | 206 CHECK(http_server_properties_); |
| 207 | 207 |
| 208 const std::string ssl_session_cache_shard = | 208 const std::string ssl_session_cache_shard = |
| 209 "http_network_session/" + base::IntToString(g_next_shard_id.GetNext()); | 209 "http_network_session/" + base::IntToString(g_next_shard_id.GetNext()); |
| 210 normal_socket_pool_manager_.reset(CreateSocketPoolManager( | 210 normal_socket_pool_manager_.reset(CreateSocketPoolManager( |
| 211 NORMAL_SOCKET_POOL, params, ssl_session_cache_shard)); | 211 NORMAL_SOCKET_POOL, params, ssl_session_cache_shard)); |
| 212 websocket_socket_pool_manager_.reset(CreateSocketPoolManager( | 212 websocket_socket_pool_manager_.reset(CreateSocketPoolManager( |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 break; | 416 break; |
| 417 case base::MemoryState::SUSPENDED: | 417 case base::MemoryState::SUSPENDED: |
| 418 // Note: Not supported at present. Fall through. | 418 // Note: Not supported at present. Fall through. |
| 419 case base::MemoryState::UNKNOWN: | 419 case base::MemoryState::UNKNOWN: |
| 420 NOTREACHED(); | 420 NOTREACHED(); |
| 421 break; | 421 break; |
| 422 } | 422 } |
| 423 } | 423 } |
| 424 | 424 |
| 425 } // namespace net | 425 } // namespace net |
| OLD | NEW |