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

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

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 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
« no previous file with comments | « net/socket/socks_client_socket.cc ('k') | net/socket/socks_client_socket_unittest.cc » ('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.h" 9 #include "base/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "net/base/net_errors.h" 11 #include "net/base/net_errors.h"
12 #include "net/socket/client_socket_factory.h" 12 #include "net/socket/client_socket_factory.h"
13 #include "net/socket/client_socket_handle.h" 13 #include "net/socket/client_socket_handle.h"
14 #include "net/socket/client_socket_pool_base.h" 14 #include "net/socket/client_socket_pool_base.h"
15 #include "net/socket/socks5_client_socket.h" 15 #include "net/socket/socks5_client_socket.h"
16 #include "net/socket/socks_client_socket.h" 16 #include "net/socket/socks_client_socket.h"
17 #include "net/socket/transport_client_socket_pool.h" 17 #include "net/socket/transport_client_socket_pool.h"
18 18
19 namespace net { 19 namespace net {
20 20
21 SOCKSSocketParams::SOCKSSocketParams( 21 SOCKSSocketParams::SOCKSSocketParams(
22 const scoped_refptr<TransportSocketParams>& proxy_server, 22 const scoped_refptr<TransportSocketParams>& proxy_server,
23 bool socks_v5, 23 bool socks_v5,
24 const HostPortPair& host_port_pair, 24 const HostPortPair& host_port_pair,
25 RequestPriority priority) 25 RequestPriority priority)
26 : transport_params_(proxy_server), 26 : transport_params_(proxy_server),
27 destination_(host_port_pair), 27 destination_(host_port_pair),
28 socks_v5_(socks_v5) { 28 socks_v5_(socks_v5) {
29 if (transport_params_) 29 if (transport_params_.get())
30 ignore_limits_ = transport_params_->ignore_limits(); 30 ignore_limits_ = transport_params_->ignore_limits();
31 else 31 else
32 ignore_limits_ = false; 32 ignore_limits_ = false;
33 destination_.set_priority(priority); 33 destination_.set_priority(priority);
34 } 34 }
35 35
36 SOCKSSocketParams::~SOCKSSocketParams() {} 36 SOCKSSocketParams::~SOCKSSocketParams() {}
37 37
38 // SOCKSConnectJobs will time out after this many seconds. Note this is on 38 // SOCKSConnectJobs will time out after this many seconds. Note this is on
39 // top of the timeout for the transport socket. 39 // top of the timeout for the transport socket.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 return base_.histograms(); 299 return base_.histograms();
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_.CloseOneIdleConnectionInLayeredPool(); 305 return base_.CloseOneIdleConnectionInLayeredPool();
306 } 306 }
307 307
308 } // namespace net 308 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket.cc ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698