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

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

Issue 2899723003: Remove raw base::DictionaryValue::Set in //net (Closed)
Patch Set: Rebase Created 3 years, 6 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
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/ssl_client_socket_pool.h" 5 #include "net/socket/ssl_client_socket_pool.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/memory/ptr_util.h"
12 #include "base/metrics/field_trial.h" 13 #include "base/metrics/field_trial.h"
13 #include "base/metrics/histogram_macros.h" 14 #include "base/metrics/histogram_macros.h"
14 #include "base/metrics/sparse_histogram.h" 15 #include "base/metrics/sparse_histogram.h"
15 #include "base/profiler/scoped_tracker.h" 16 #include "base/profiler/scoped_tracker.h"
16 #include "base/trace_event/trace_event.h" 17 #include "base/trace_event/trace_event.h"
17 #include "base/values.h" 18 #include "base/values.h"
18 #include "net/base/host_port_pair.h" 19 #include "net/base/host_port_pair.h"
19 #include "net/base/net_errors.h" 20 #include "net/base/net_errors.h"
20 #include "net/base/trace_constants.h" 21 #include "net/base/trace_constants.h"
21 #include "net/http/http_proxy_client_socket.h" 22 #include "net/http/http_proxy_client_socket.h"
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 const std::string& parent_dump_absolute_name) const { 710 const std::string& parent_dump_absolute_name) const {
710 base_.DumpMemoryStats(pmd, parent_dump_absolute_name); 711 base_.DumpMemoryStats(pmd, parent_dump_absolute_name);
711 } 712 }
712 713
713 std::unique_ptr<base::DictionaryValue> SSLClientSocketPool::GetInfoAsValue( 714 std::unique_ptr<base::DictionaryValue> SSLClientSocketPool::GetInfoAsValue(
714 const std::string& name, 715 const std::string& name,
715 const std::string& type, 716 const std::string& type,
716 bool include_nested_pools) const { 717 bool include_nested_pools) const {
717 std::unique_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type)); 718 std::unique_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
718 if (include_nested_pools) { 719 if (include_nested_pools) {
719 base::ListValue* list = new base::ListValue(); 720 auto list = base::MakeUnique<base::ListValue>();
720 if (transport_pool_) { 721 if (transport_pool_) {
721 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", 722 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool",
722 "transport_socket_pool", 723 "transport_socket_pool",
723 false)); 724 false));
724 } 725 }
725 if (socks_pool_) { 726 if (socks_pool_) {
726 list->Append(socks_pool_->GetInfoAsValue("socks_pool", 727 list->Append(socks_pool_->GetInfoAsValue("socks_pool",
727 "socks_pool", 728 "socks_pool",
728 true)); 729 true));
729 } 730 }
730 if (http_proxy_pool_) { 731 if (http_proxy_pool_) {
731 list->Append(http_proxy_pool_->GetInfoAsValue("http_proxy_pool", 732 list->Append(http_proxy_pool_->GetInfoAsValue("http_proxy_pool",
732 "http_proxy_pool", 733 "http_proxy_pool",
733 true)); 734 true));
734 } 735 }
735 dict->Set("nested_pools", list); 736 dict->Set("nested_pools", std::move(list));
736 } 737 }
737 return dict; 738 return dict;
738 } 739 }
739 740
740 base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const { 741 base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const {
741 return base_.ConnectionTimeout(); 742 return base_.ConnectionTimeout();
742 } 743 }
743 744
744 bool SSLClientSocketPool::IsStalled() const { 745 bool SSLClientSocketPool::IsStalled() const {
745 return base_.IsStalled(); 746 return base_.IsStalled();
(...skipping 12 matching lines...) Expand all
758 if (base_.CloseOneIdleSocket()) 759 if (base_.CloseOneIdleSocket())
759 return true; 760 return true;
760 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 761 return base_.CloseOneIdleConnectionInHigherLayeredPool();
761 } 762 }
762 763
763 void SSLClientSocketPool::OnSSLConfigChanged() { 764 void SSLClientSocketPool::OnSSLConfigChanged() {
764 FlushWithError(ERR_NETWORK_CHANGED); 765 FlushWithError(ERR_NETWORK_CHANGED);
765 } 766 }
766 767
767 } // namespace net 768 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_connection_logger.cc ('k') | net/test/spawned_test_server/base_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698