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

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

Issue 1158193006: Converted bare pointer to scoped_ptr<> in net/socket and net/http (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed failed net unit tests Created 5 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
« no previous file with comments | « net/socket/socks_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool.h » ('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/socks_client_socket_pool.h" 5 #include "net/socket/socks_client_socket_pool.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 int SOCKSClientSocketPool::IdleSocketCountInGroup( 259 int SOCKSClientSocketPool::IdleSocketCountInGroup(
260 const std::string& group_name) const { 260 const std::string& group_name) const {
261 return base_.IdleSocketCountInGroup(group_name); 261 return base_.IdleSocketCountInGroup(group_name);
262 } 262 }
263 263
264 LoadState SOCKSClientSocketPool::GetLoadState( 264 LoadState SOCKSClientSocketPool::GetLoadState(
265 const std::string& group_name, const ClientSocketHandle* handle) const { 265 const std::string& group_name, const ClientSocketHandle* handle) const {
266 return base_.GetLoadState(group_name, handle); 266 return base_.GetLoadState(group_name, handle);
267 } 267 }
268 268
269 base::DictionaryValue* SOCKSClientSocketPool::GetInfoAsValue( 269 scoped_ptr<base::DictionaryValue> SOCKSClientSocketPool::GetInfoAsValue(
270 const std::string& name, 270 const std::string& name,
271 const std::string& type, 271 const std::string& type,
272 bool include_nested_pools) const { 272 bool include_nested_pools) const {
273 base::DictionaryValue* dict = base_.GetInfoAsValue(name, type); 273 scoped_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
274 if (include_nested_pools) { 274 if (include_nested_pools) {
275 scoped_ptr<base::ListValue> list(new base::ListValue()); 275 scoped_ptr<base::ListValue> list(new base::ListValue());
276 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", 276 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool",
277 "transport_socket_pool", 277 "transport_socket_pool",
278 false)); 278 false));
279 dict->Set("nested_pools", list.Pass()); 279 dict->Set("nested_pools", list.Pass());
280 } 280 }
281 return dict; 281 return dict.Pass();
282 } 282 }
283 283
284 base::TimeDelta SOCKSClientSocketPool::ConnectionTimeout() const { 284 base::TimeDelta SOCKSClientSocketPool::ConnectionTimeout() const {
285 return base_.ConnectionTimeout(); 285 return base_.ConnectionTimeout();
286 } 286 }
287 287
288 bool SOCKSClientSocketPool::IsStalled() const { 288 bool SOCKSClientSocketPool::IsStalled() const {
289 return base_.IsStalled(); 289 return base_.IsStalled();
290 } 290 }
291 291
292 void SOCKSClientSocketPool::AddHigherLayeredPool( 292 void SOCKSClientSocketPool::AddHigherLayeredPool(
293 HigherLayeredPool* higher_pool) { 293 HigherLayeredPool* higher_pool) {
294 base_.AddHigherLayeredPool(higher_pool); 294 base_.AddHigherLayeredPool(higher_pool);
295 } 295 }
296 296
297 void SOCKSClientSocketPool::RemoveHigherLayeredPool( 297 void SOCKSClientSocketPool::RemoveHigherLayeredPool(
298 HigherLayeredPool* higher_pool) { 298 HigherLayeredPool* higher_pool) {
299 base_.RemoveHigherLayeredPool(higher_pool); 299 base_.RemoveHigherLayeredPool(higher_pool);
300 } 300 }
301 301
302 bool SOCKSClientSocketPool::CloseOneIdleConnection() { 302 bool SOCKSClientSocketPool::CloseOneIdleConnection() {
303 if (base_.CloseOneIdleSocket()) 303 if (base_.CloseOneIdleSocket())
304 return true; 304 return true;
305 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 305 return base_.CloseOneIdleConnectionInHigherLayeredPool();
306 } 306 }
307 307
308 } // namespace net 308 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket_pool.h ('k') | net/socket/ssl_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698