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

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

Issue 1696005: Add net log entries that summarize transmit and receive byte counts. (Closed)
Patch Set: More tests and address comments 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.cc ('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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 // Add a SOCKS connection on top of the tcp socket. 122 // Add a SOCKS connection on top of the tcp socket.
123 if (socks_params_.is_socks_v5()) { 123 if (socks_params_.is_socks_v5()) {
124 socket_.reset(new SOCKS5ClientSocket(tcp_socket_handle_.release(), 124 socket_.reset(new SOCKS5ClientSocket(tcp_socket_handle_.release(),
125 socks_params_.destination())); 125 socks_params_.destination()));
126 } else { 126 } else {
127 socket_.reset(new SOCKSClientSocket(tcp_socket_handle_.release(), 127 socket_.reset(new SOCKSClientSocket(tcp_socket_handle_.release(),
128 socks_params_.destination(), 128 socks_params_.destination(),
129 resolver_)); 129 resolver_));
130 } 130 }
131 return socket_->Connect(&callback_, net_log()); 131 return socket_->Connect(&callback_);
132 } 132 }
133 133
134 int SOCKSConnectJob::DoSOCKSConnectComplete(int result) { 134 int SOCKSConnectJob::DoSOCKSConnectComplete(int result) {
135 if (result != OK) { 135 if (result != OK) {
136 socket_->Disconnect(); 136 socket_->Disconnect();
137 return result; 137 return result;
138 } 138 }
139 139
140 set_socket(socket_.release()); 140 set_socket(socket_.release());
141 return result; 141 return result;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 const std::string& group_name) const { 205 const std::string& group_name) const {
206 return base_.IdleSocketCountInGroup(group_name); 206 return base_.IdleSocketCountInGroup(group_name);
207 } 207 }
208 208
209 LoadState SOCKSClientSocketPool::GetLoadState( 209 LoadState SOCKSClientSocketPool::GetLoadState(
210 const std::string& group_name, const ClientSocketHandle* handle) const { 210 const std::string& group_name, const ClientSocketHandle* handle) const {
211 return base_.GetLoadState(group_name, handle); 211 return base_.GetLoadState(group_name, handle);
212 } 212 }
213 213
214 } // namespace net 214 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket.cc ('k') | net/socket/socks_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698