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

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

Issue 2802015: Massively simplify the NetworkChangeNotifier infrastructure:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/time.h" 7 #include "base/time.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/socket/client_socket_factory.h" 10 #include "net/socket/client_socket_factory.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return tcp_pool_->ConnectionTimeout() + 156 return tcp_pool_->ConnectionTimeout() +
157 base::TimeDelta::FromSeconds(kSOCKSConnectJobTimeoutInSeconds); 157 base::TimeDelta::FromSeconds(kSOCKSConnectJobTimeoutInSeconds);
158 } 158 }
159 159
160 SOCKSClientSocketPool::SOCKSClientSocketPool( 160 SOCKSClientSocketPool::SOCKSClientSocketPool(
161 int max_sockets, 161 int max_sockets,
162 int max_sockets_per_group, 162 int max_sockets_per_group,
163 const scoped_refptr<ClientSocketPoolHistograms>& histograms, 163 const scoped_refptr<ClientSocketPoolHistograms>& histograms,
164 const scoped_refptr<HostResolver>& host_resolver, 164 const scoped_refptr<HostResolver>& host_resolver,
165 const scoped_refptr<TCPClientSocketPool>& tcp_pool, 165 const scoped_refptr<TCPClientSocketPool>& tcp_pool,
166 NetworkChangeNotifier* network_change_notifier,
167 NetLog* net_log) 166 NetLog* net_log)
168 : base_(max_sockets, max_sockets_per_group, histograms, 167 : base_(max_sockets, max_sockets_per_group, histograms,
169 base::TimeDelta::FromSeconds( 168 base::TimeDelta::FromSeconds(
170 ClientSocketPool::unused_idle_socket_timeout()), 169 ClientSocketPool::unused_idle_socket_timeout()),
171 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), 170 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout),
172 new SOCKSConnectJobFactory(tcp_pool, host_resolver, net_log), 171 new SOCKSConnectJobFactory(tcp_pool, host_resolver, net_log)) {
173 network_change_notifier) {} 172 }
174 173
175 SOCKSClientSocketPool::~SOCKSClientSocketPool() {} 174 SOCKSClientSocketPool::~SOCKSClientSocketPool() {}
176 175
177 int SOCKSClientSocketPool::RequestSocket( 176 int SOCKSClientSocketPool::RequestSocket(
178 const std::string& group_name, 177 const std::string& group_name,
179 const void* socket_params, 178 const void* socket_params,
180 RequestPriority priority, 179 RequestPriority priority,
181 ClientSocketHandle* handle, 180 ClientSocketHandle* handle,
182 CompletionCallback* callback, 181 CompletionCallback* callback,
183 const BoundNetLog& net_log) { 182 const BoundNetLog& net_log) {
(...skipping 29 matching lines...) Expand all
213 const std::string& group_name) const { 212 const std::string& group_name) const {
214 return base_.IdleSocketCountInGroup(group_name); 213 return base_.IdleSocketCountInGroup(group_name);
215 } 214 }
216 215
217 LoadState SOCKSClientSocketPool::GetLoadState( 216 LoadState SOCKSClientSocketPool::GetLoadState(
218 const std::string& group_name, const ClientSocketHandle* handle) const { 217 const std::string& group_name, const ClientSocketHandle* handle) const {
219 return base_.GetLoadState(group_name, handle); 218 return base_.GetLoadState(group_name, handle);
220 } 219 }
221 220
222 } // namespace net 221 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698