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

Side by Side Diff: net/http/http_proxy_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: 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
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/http/http_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 int HttpProxyClientSocketPool::IdleSocketCountInGroup( 504 int HttpProxyClientSocketPool::IdleSocketCountInGroup(
505 const std::string& group_name) const { 505 const std::string& group_name) const {
506 return base_.IdleSocketCountInGroup(group_name); 506 return base_.IdleSocketCountInGroup(group_name);
507 } 507 }
508 508
509 LoadState HttpProxyClientSocketPool::GetLoadState( 509 LoadState HttpProxyClientSocketPool::GetLoadState(
510 const std::string& group_name, const ClientSocketHandle* handle) const { 510 const std::string& group_name, const ClientSocketHandle* handle) const {
511 return base_.GetLoadState(group_name, handle); 511 return base_.GetLoadState(group_name, handle);
512 } 512 }
513 513
514 base::DictionaryValue* HttpProxyClientSocketPool::GetInfoAsValue( 514 scoped_ptr<base::DictionaryValue> HttpProxyClientSocketPool::GetInfoAsValue(
515 const std::string& name, 515 const std::string& name,
516 const std::string& type, 516 const std::string& type,
517 bool include_nested_pools) const { 517 bool include_nested_pools) const {
518 base::DictionaryValue* dict = base_.GetInfoAsValue(name, type); 518 scoped_ptr<base::DictionaryValue>
519 dict(base_.GetInfoAsValue(name, type).Pass());
eroman 2015/06/01 17:07:22 No need for .Pass(), can directly assign
519 if (include_nested_pools) { 520 if (include_nested_pools) {
520 base::ListValue* list = new base::ListValue(); 521 base::ListValue* list = new base::ListValue();
521 if (transport_pool_) { 522 if (transport_pool_) {
522 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", 523 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool",
523 "transport_socket_pool", 524 "transport_socket_pool",
524 true)); 525 true));
525 } 526 }
526 if (ssl_pool_) { 527 if (ssl_pool_) {
527 list->Append(ssl_pool_->GetInfoAsValue("ssl_socket_pool", 528 list->Append(ssl_pool_->GetInfoAsValue("ssl_socket_pool",
528 "ssl_socket_pool", 529 "ssl_socket_pool",
529 true)); 530 true));
530 } 531 }
531 dict->Set("nested_pools", list); 532 dict->Set("nested_pools", list);
532 } 533 }
533 return dict; 534 return dict.Pass();
534 } 535 }
535 536
536 base::TimeDelta HttpProxyClientSocketPool::ConnectionTimeout() const { 537 base::TimeDelta HttpProxyClientSocketPool::ConnectionTimeout() const {
537 return base_.ConnectionTimeout(); 538 return base_.ConnectionTimeout();
538 } 539 }
539 540
540 bool HttpProxyClientSocketPool::IsStalled() const { 541 bool HttpProxyClientSocketPool::IsStalled() const {
541 return base_.IsStalled(); 542 return base_.IsStalled();
542 } 543 }
543 544
544 void HttpProxyClientSocketPool::AddHigherLayeredPool( 545 void HttpProxyClientSocketPool::AddHigherLayeredPool(
545 HigherLayeredPool* higher_pool) { 546 HigherLayeredPool* higher_pool) {
546 base_.AddHigherLayeredPool(higher_pool); 547 base_.AddHigherLayeredPool(higher_pool);
547 } 548 }
548 549
549 void HttpProxyClientSocketPool::RemoveHigherLayeredPool( 550 void HttpProxyClientSocketPool::RemoveHigherLayeredPool(
550 HigherLayeredPool* higher_pool) { 551 HigherLayeredPool* higher_pool) {
551 base_.RemoveHigherLayeredPool(higher_pool); 552 base_.RemoveHigherLayeredPool(higher_pool);
552 } 553 }
553 554
554 bool HttpProxyClientSocketPool::CloseOneIdleConnection() { 555 bool HttpProxyClientSocketPool::CloseOneIdleConnection() {
555 if (base_.CloseOneIdleSocket()) 556 if (base_.CloseOneIdleSocket())
556 return true; 557 return true;
557 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 558 return base_.CloseOneIdleConnectionInHigherLayeredPool();
558 } 559 }
559 560
560 } // namespace net 561 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698