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

Unified Diff: net/socket/socks_client_socket_pool.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: net/socket/socks_client_socket_pool.cc
diff --git a/net/socket/socks_client_socket_pool.cc b/net/socket/socks_client_socket_pool.cc
index e11b7a48db5b6f8e8ed21823d2afdd718a473c8d..c197a5148fd679b3e4f62811ee02d8c9c2e9395b 100644
--- a/net/socket/socks_client_socket_pool.cc
+++ b/net/socket/socks_client_socket_pool.cc
@@ -31,7 +31,8 @@ SOCKSSocketParams::SOCKSSocketParams(
ignore_limits_ = false;
}
-SOCKSSocketParams::~SOCKSSocketParams() {}
+SOCKSSocketParams::~SOCKSSocketParams() {
+}
// SOCKSConnectJobs will time out after this many seconds. Note this is on
// top of the timeout for the transport socket.
@@ -46,13 +47,16 @@ SOCKSConnectJob::SOCKSConnectJob(
HostResolver* host_resolver,
Delegate* delegate,
NetLog* net_log)
- : ConnectJob(group_name, timeout_duration, priority, delegate,
+ : ConnectJob(group_name,
+ timeout_duration,
+ priority,
+ delegate,
BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)),
socks_params_(socks_params),
transport_pool_(transport_pool),
resolver_(host_resolver),
- callback_(base::Bind(&SOCKSConnectJob::OnIOComplete,
- base::Unretained(this))) {
+ callback_(
+ base::Bind(&SOCKSConnectJob::OnIOComplete, base::Unretained(this))) {
}
SOCKSConnectJob::~SOCKSConnectJob() {
@@ -186,7 +190,7 @@ SOCKSClientSocketPool::SOCKSConnectJobFactory::NewConnectJob(
base::TimeDelta
SOCKSClientSocketPool::SOCKSConnectJobFactory::ConnectionTimeout() const {
return transport_pool_->ConnectionTimeout() +
- base::TimeDelta::FromSeconds(kSOCKSConnectJobTimeoutInSeconds);
+ base::TimeDelta::FromSeconds(kSOCKSConnectJobTimeoutInSeconds);
}
SOCKSClientSocketPool::SOCKSClientSocketPool(
@@ -197,12 +201,14 @@ SOCKSClientSocketPool::SOCKSClientSocketPool(
TransportClientSocketPool* transport_pool,
NetLog* net_log)
: transport_pool_(transport_pool),
- base_(this, max_sockets, max_sockets_per_group, histograms,
- ClientSocketPool::unused_idle_socket_timeout(),
- ClientSocketPool::used_idle_socket_timeout(),
- new SOCKSConnectJobFactory(transport_pool,
- host_resolver,
- net_log)) {
+ base_(
+ this,
+ max_sockets,
+ max_sockets_per_group,
+ histograms,
+ ClientSocketPool::unused_idle_socket_timeout(),
+ ClientSocketPool::used_idle_socket_timeout(),
+ new SOCKSConnectJobFactory(transport_pool, host_resolver, net_log)) {
// We should always have a |transport_pool_| except in unit tests.
if (transport_pool_)
base_.AddLowerLayeredPool(transport_pool_);
@@ -211,22 +217,23 @@ SOCKSClientSocketPool::SOCKSClientSocketPool(
SOCKSClientSocketPool::~SOCKSClientSocketPool() {
}
-int SOCKSClientSocketPool::RequestSocket(
- const std::string& group_name, const void* socket_params,
- RequestPriority priority, ClientSocketHandle* handle,
- const CompletionCallback& callback, const BoundNetLog& net_log) {
+int SOCKSClientSocketPool::RequestSocket(const std::string& group_name,
+ const void* socket_params,
+ RequestPriority priority,
+ ClientSocketHandle* handle,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) {
const scoped_refptr<SOCKSSocketParams>* casted_socket_params =
static_cast<const scoped_refptr<SOCKSSocketParams>*>(socket_params);
- return base_.RequestSocket(group_name, *casted_socket_params, priority,
- handle, callback, net_log);
+ return base_.RequestSocket(
+ group_name, *casted_socket_params, priority, handle, callback, net_log);
}
-void SOCKSClientSocketPool::RequestSockets(
- const std::string& group_name,
- const void* params,
- int num_sockets,
- const BoundNetLog& net_log) {
+void SOCKSClientSocketPool::RequestSockets(const std::string& group_name,
+ const void* params,
+ int num_sockets,
+ const BoundNetLog& net_log) {
const scoped_refptr<SOCKSSocketParams>* casted_params =
static_cast<const scoped_refptr<SOCKSSocketParams>*>(params);
@@ -262,7 +269,8 @@ int SOCKSClientSocketPool::IdleSocketCountInGroup(
}
LoadState SOCKSClientSocketPool::GetLoadState(
- const std::string& group_name, const ClientSocketHandle* handle) const {
+ const std::string& group_name,
+ const ClientSocketHandle* handle) const {
return base_.GetLoadState(group_name, handle);
}
@@ -273,9 +281,8 @@ base::DictionaryValue* SOCKSClientSocketPool::GetInfoAsValue(
base::DictionaryValue* dict = base_.GetInfoAsValue(name, type);
if (include_nested_pools) {
base::ListValue* list = new base::ListValue();
- list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool",
- "transport_socket_pool",
- false));
+ list->Append(transport_pool_->GetInfoAsValue(
+ "transport_socket_pool", "transport_socket_pool", false));
dict->Set("nested_pools", list);
}
return dict;

Powered by Google App Engine
This is Rietveld 408576698