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

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

Issue 1604045: Fix crash on IP address change. (Closed)
Patch Set: Merge conflict Created 10 years, 8 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/socks_client_socket_pool_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) 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 SOCKSClientSocketPool::SOCKSConnectJobFactory::ConnectionTimeout() const { 154 SOCKSClientSocketPool::SOCKSConnectJobFactory::ConnectionTimeout() const {
155 return tcp_pool_->ConnectionTimeout() + 155 return tcp_pool_->ConnectionTimeout() +
156 base::TimeDelta::FromSeconds(kSOCKSConnectJobTimeoutInSeconds); 156 base::TimeDelta::FromSeconds(kSOCKSConnectJobTimeoutInSeconds);
157 } 157 }
158 158
159 SOCKSClientSocketPool::SOCKSClientSocketPool( 159 SOCKSClientSocketPool::SOCKSClientSocketPool(
160 int max_sockets, 160 int max_sockets,
161 int max_sockets_per_group, 161 int max_sockets_per_group,
162 const std::string& name, 162 const std::string& name,
163 const scoped_refptr<HostResolver>& host_resolver, 163 const scoped_refptr<HostResolver>& host_resolver,
164 const scoped_refptr<TCPClientSocketPool>& tcp_pool) 164 const scoped_refptr<TCPClientSocketPool>& tcp_pool,
165 NetworkChangeNotifier* network_change_notifier)
165 : base_(max_sockets, max_sockets_per_group, name, 166 : base_(max_sockets, max_sockets_per_group, name,
166 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout), 167 base::TimeDelta::FromSeconds(kUnusedIdleSocketTimeout),
167 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), 168 base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout),
168 new SOCKSConnectJobFactory(tcp_pool, host_resolver)) {} 169 new SOCKSConnectJobFactory(tcp_pool, host_resolver),
170 network_change_notifier) {}
169 171
170 SOCKSClientSocketPool::~SOCKSClientSocketPool() {} 172 SOCKSClientSocketPool::~SOCKSClientSocketPool() {}
171 173
172 int SOCKSClientSocketPool::RequestSocket( 174 int SOCKSClientSocketPool::RequestSocket(
173 const std::string& group_name, 175 const std::string& group_name,
174 const void* socket_params, 176 const void* socket_params,
175 RequestPriority priority, 177 RequestPriority priority,
176 ClientSocketHandle* handle, 178 ClientSocketHandle* handle,
177 CompletionCallback* callback, 179 CompletionCallback* callback,
178 const BoundNetLog& net_log) { 180 const BoundNetLog& net_log) {
(...skipping 24 matching lines...) Expand all
203 const std::string& group_name) const { 205 const std::string& group_name) const {
204 return base_.IdleSocketCountInGroup(group_name); 206 return base_.IdleSocketCountInGroup(group_name);
205 } 207 }
206 208
207 LoadState SOCKSClientSocketPool::GetLoadState( 209 LoadState SOCKSClientSocketPool::GetLoadState(
208 const std::string& group_name, const ClientSocketHandle* handle) const { 210 const std::string& group_name, const ClientSocketHandle* handle) const {
209 return base_.GetLoadState(group_name, handle); 211 return base_.GetLoadState(group_name, handle);
210 } 212 }
211 213
212 } // namespace net 214 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket_pool.h ('k') | net/socket/socks_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698