| 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/socket/client_socket_pool_manager_impl.h" | 5 #include "net/socket/client_socket_pool_manager_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 GetSocketPoolForHTTPProxy(proxy_server), ssl_config_service_.get(), | 323 GetSocketPoolForHTTPProxy(proxy_server), ssl_config_service_.get(), |
| 324 net_log_); | 324 net_log_); |
| 325 | 325 |
| 326 std::pair<SSLSocketPoolMap::iterator, bool> ret = | 326 std::pair<SSLSocketPoolMap::iterator, bool> ret = |
| 327 ssl_socket_pools_for_proxies_.insert(std::make_pair(proxy_server, | 327 ssl_socket_pools_for_proxies_.insert(std::make_pair(proxy_server, |
| 328 new_pool)); | 328 new_pool)); |
| 329 | 329 |
| 330 return ret.first->second; | 330 return ret.first->second; |
| 331 } | 331 } |
| 332 | 332 |
| 333 scoped_ptr<base::Value> ClientSocketPoolManagerImpl::SocketPoolInfoToValue() | 333 std::unique_ptr<base::Value> |
| 334 const { | 334 ClientSocketPoolManagerImpl::SocketPoolInfoToValue() const { |
| 335 scoped_ptr<base::ListValue> list(new base::ListValue()); | 335 std::unique_ptr<base::ListValue> list(new base::ListValue()); |
| 336 list->Append(transport_socket_pool_->GetInfoAsValue("transport_socket_pool", | 336 list->Append(transport_socket_pool_->GetInfoAsValue("transport_socket_pool", |
| 337 "transport_socket_pool", | 337 "transport_socket_pool", |
| 338 false)); | 338 false)); |
| 339 // Third parameter is false because |ssl_socket_pool_| uses | 339 // Third parameter is false because |ssl_socket_pool_| uses |
| 340 // |transport_socket_pool_| internally, and do not want to add it a second | 340 // |transport_socket_pool_| internally, and do not want to add it a second |
| 341 // time. | 341 // time. |
| 342 list->Append(ssl_socket_pool_->GetInfoAsValue("ssl_socket_pool", | 342 list->Append(ssl_socket_pool_->GetInfoAsValue("ssl_socket_pool", |
| 343 "ssl_socket_pool", | 343 "ssl_socket_pool", |
| 344 false)); | 344 false)); |
| 345 AddSocketPoolsToList(list.get(), http_proxy_socket_pools_, | 345 AddSocketPoolsToList(list.get(), http_proxy_socket_pools_, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 367 // We should not flush the socket pools if we added trust to a | 367 // We should not flush the socket pools if we added trust to a |
| 368 // cert. | 368 // cert. |
| 369 // | 369 // |
| 370 // Since the OnCACertChanged method doesn't tell us what | 370 // Since the OnCACertChanged method doesn't tell us what |
| 371 // kind of change it is, we have to flush the socket | 371 // kind of change it is, we have to flush the socket |
| 372 // pools to be safe. | 372 // pools to be safe. |
| 373 FlushSocketPoolsWithError(ERR_NETWORK_CHANGED); | 373 FlushSocketPoolsWithError(ERR_NETWORK_CHANGED); |
| 374 } | 374 } |
| 375 | 375 |
| 376 } // namespace net | 376 } // namespace net |
| OLD | NEW |