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" |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 dict->SetBoolean("quic_enabled", params_.enable_quic); | 298 dict->SetBoolean("quic_enabled", params_.enable_quic); |
299 dict->SetBoolean("quic_enabled_for_proxies", params_.enable_quic_for_proxies); | 299 dict->SetBoolean("quic_enabled_for_proxies", params_.enable_quic_for_proxies); |
300 dict->SetBoolean("enable_quic_port_selection", | 300 dict->SetBoolean("enable_quic_port_selection", |
301 params_.enable_quic_port_selection); | 301 params_.enable_quic_port_selection); |
302 scoped_ptr<base::ListValue> connection_options(new base::ListValue); | 302 scoped_ptr<base::ListValue> connection_options(new base::ListValue); |
303 for (QuicTagVector::const_iterator it = | 303 for (QuicTagVector::const_iterator it = |
304 params_.quic_connection_options.begin(); | 304 params_.quic_connection_options.begin(); |
305 it != params_.quic_connection_options.end(); ++it) { | 305 it != params_.quic_connection_options.end(); ++it) { |
306 connection_options->AppendString("'" + QuicUtils::TagToString(*it) + "'"); | 306 connection_options->AppendString("'" + QuicUtils::TagToString(*it) + "'"); |
307 } | 307 } |
308 dict->Set("connection_options", connection_options.Pass()); | 308 dict->Set("connection_options", std::move(connection_options)); |
309 dict->SetString("origin_to_force_quic_on", | 309 dict->SetString("origin_to_force_quic_on", |
310 params_.origin_to_force_quic_on.ToString()); | 310 params_.origin_to_force_quic_on.ToString()); |
311 dict->SetDouble("alternative_service_probability_threshold", | 311 dict->SetDouble("alternative_service_probability_threshold", |
312 params_.alternative_service_probability_threshold); | 312 params_.alternative_service_probability_threshold); |
313 dict->SetString("disabled_reason", | 313 dict->SetString("disabled_reason", |
314 quic_stream_factory_.QuicDisabledReasonString()); | 314 quic_stream_factory_.QuicDisabledReasonString()); |
315 return dict.Pass(); | 315 return std::move(dict); |
316 } | 316 } |
317 | 317 |
318 void HttpNetworkSession::CloseAllConnections() { | 318 void HttpNetworkSession::CloseAllConnections() { |
319 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 319 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
320 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 320 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
321 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); | 321 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); |
322 quic_stream_factory_.CloseAllSessions(ERR_ABORTED); | 322 quic_stream_factory_.CloseAllSessions(ERR_ABORTED); |
323 } | 323 } |
324 | 324 |
325 void HttpNetworkSession::CloseIdleConnections() { | 325 void HttpNetworkSession::CloseIdleConnections() { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 case WEBSOCKET_SOCKET_POOL: | 364 case WEBSOCKET_SOCKET_POOL: |
365 return websocket_socket_pool_manager_.get(); | 365 return websocket_socket_pool_manager_.get(); |
366 default: | 366 default: |
367 NOTREACHED(); | 367 NOTREACHED(); |
368 break; | 368 break; |
369 } | 369 } |
370 return NULL; | 370 return NULL; |
371 } | 371 } |
372 | 372 |
373 } // namespace net | 373 } // namespace net |
OLD | NEW |