Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(888)

Side by Side Diff: net/socket/client_socket_pool_manager_impl.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/socket_net_log_params.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "net/http/http_network_session.h" 12 #include "net/http/http_network_session.h"
12 #include "net/http/http_proxy_client_socket_pool.h" 13 #include "net/http/http_proxy_client_socket_pool.h"
13 #include "net/socket/socks_client_socket_pool.h" 14 #include "net/socket/socks_client_socket_pool.h"
14 #include "net/socket/ssl_client_socket_pool.h" 15 #include "net/socket/ssl_client_socket_pool.h"
15 #include "net/socket/transport_client_socket_pool.h" 16 #include "net/socket/transport_client_socket_pool.h"
16 #include "net/socket/websocket_transport_client_socket_pool.h" 17 #include "net/socket/websocket_transport_client_socket_pool.h"
17 #include "net/ssl/ssl_config_service.h" 18 #include "net/ssl/ssl_config_service.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 false)); 352 false));
352 AddSocketPoolsToList(list.get(), http_proxy_socket_pools_, 353 AddSocketPoolsToList(list.get(), http_proxy_socket_pools_,
353 "http_proxy_socket_pool", true); 354 "http_proxy_socket_pool", true);
354 AddSocketPoolsToList(list.get(), socks_socket_pools_, "socks_socket_pool", 355 AddSocketPoolsToList(list.get(), socks_socket_pools_, "socks_socket_pool",
355 true); 356 true);
356 357
357 // Third parameter is false because |ssl_socket_pools_for_proxies_| use 358 // Third parameter is false because |ssl_socket_pools_for_proxies_| use
358 // socket pools in |http_proxy_socket_pools_| and |socks_socket_pools_|. 359 // socket pools in |http_proxy_socket_pools_| and |socks_socket_pools_|.
359 AddSocketPoolsToList(list.get(), ssl_socket_pools_for_proxies_, 360 AddSocketPoolsToList(list.get(), ssl_socket_pools_for_proxies_,
360 "ssl_socket_pool_for_proxies", false); 361 "ssl_socket_pool_for_proxies", false);
361 return list.Pass(); 362 return std::move(list);
362 } 363 }
363 364
364 void ClientSocketPoolManagerImpl::OnCertAdded(const X509Certificate* cert) { 365 void ClientSocketPoolManagerImpl::OnCertAdded(const X509Certificate* cert) {
365 FlushSocketPoolsWithError(ERR_NETWORK_CHANGED); 366 FlushSocketPoolsWithError(ERR_NETWORK_CHANGED);
366 } 367 }
367 368
368 void ClientSocketPoolManagerImpl::OnCACertChanged( 369 void ClientSocketPoolManagerImpl::OnCACertChanged(
369 const X509Certificate* cert) { 370 const X509Certificate* cert) {
370 // We should flush the socket pools if we removed trust from a 371 // We should flush the socket pools if we removed trust from a
371 // cert, because a previously trusted server may have become 372 // cert, because a previously trusted server may have become
372 // untrusted. 373 // untrusted.
373 // 374 //
374 // We should not flush the socket pools if we added trust to a 375 // We should not flush the socket pools if we added trust to a
375 // cert. 376 // cert.
376 // 377 //
377 // Since the OnCACertChanged method doesn't tell us what 378 // Since the OnCACertChanged method doesn't tell us what
378 // kind of change it is, we have to flush the socket 379 // kind of change it is, we have to flush the socket
379 // pools to be safe. 380 // pools to be safe.
380 FlushSocketPoolsWithError(ERR_NETWORK_CHANGED); 381 FlushSocketPoolsWithError(ERR_NETWORK_CHANGED);
381 } 382 }
382 383
383 } // namespace net 384 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/socket_net_log_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698