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

Unified Diff: net/socket/client_socket_pool_manager_impl.cc

Issue 1153003002: Returning scoped_ptr instead of raw pointer in SocketPoolInfoToValue() in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated CL as directed. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/client_socket_pool_manager_impl.h ('k') | net/socket/mock_client_socket_pool_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_manager_impl.cc
diff --git a/net/socket/client_socket_pool_manager_impl.cc b/net/socket/client_socket_pool_manager_impl.cc
index c43678d6eb3f163b4f98955c6e9b4076fa28b0e6..9dbb19e9c622579513b3a3eaff2f30b69a37b72a 100644
--- a/net/socket/client_socket_pool_manager_impl.cc
+++ b/net/socket/client_socket_pool_manager_impl.cc
@@ -324,8 +324,9 @@ SSLClientSocketPool* ClientSocketPoolManagerImpl::GetSocketPoolForSSLWithProxy(
return ret.first->second;
}
-base::Value* ClientSocketPoolManagerImpl::SocketPoolInfoToValue() const {
- base::ListValue* list = new base::ListValue();
+scoped_ptr<base::Value> ClientSocketPoolManagerImpl::SocketPoolInfoToValue()
+ const {
+ scoped_ptr<base::ListValue> list(new base::ListValue());
list->Append(transport_socket_pool_->GetInfoAsValue("transport_socket_pool",
"transport_socket_pool",
false));
@@ -335,22 +336,16 @@ base::Value* ClientSocketPoolManagerImpl::SocketPoolInfoToValue() const {
list->Append(ssl_socket_pool_->GetInfoAsValue("ssl_socket_pool",
"ssl_socket_pool",
false));
- AddSocketPoolsToList(list,
- http_proxy_socket_pools_,
- "http_proxy_socket_pool",
- true);
- AddSocketPoolsToList(list,
- socks_socket_pools_,
- "socks_socket_pool",
+ AddSocketPoolsToList(list.get(), http_proxy_socket_pools_,
+ "http_proxy_socket_pool", true);
+ AddSocketPoolsToList(list.get(), socks_socket_pools_, "socks_socket_pool",
true);
// Third parameter is false because |ssl_socket_pools_for_proxies_| use
// socket pools in |http_proxy_socket_pools_| and |socks_socket_pools_|.
- AddSocketPoolsToList(list,
- ssl_socket_pools_for_proxies_,
- "ssl_socket_pool_for_proxies",
- false);
- return list;
+ AddSocketPoolsToList(list.get(), ssl_socket_pools_for_proxies_,
+ "ssl_socket_pool_for_proxies", false);
+ return list.Pass();
}
void ClientSocketPoolManagerImpl::OnCertAdded(const X509Certificate* cert) {
« no previous file with comments | « net/socket/client_socket_pool_manager_impl.h ('k') | net/socket/mock_client_socket_pool_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698