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

Side by Side Diff: net/socket_stream/socket_stream.cc

Issue 507048: Cleanup: Remove the support for IPv4 and IPv6 addressing types in the SOCKS5 ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Rename error Created 11 years 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/socks5_client_socket_unittest.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // TODO(ukai): code is similar with http_network_transaction.cc. We should 5 // TODO(ukai): code is similar with http_network_transaction.cc. We should
6 // think about ways to share code, if possible. 6 // think about ways to share code, if possible.
7 7
8 #include "net/socket_stream/socket_stream.h" 8 #include "net/socket_stream/socket_stream.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 int SocketStream::DoSOCKSConnect() { 697 int SocketStream::DoSOCKSConnect() {
698 DCHECK_EQ(kSOCKSProxy, proxy_mode_); 698 DCHECK_EQ(kSOCKSProxy, proxy_mode_);
699 699
700 next_state_ = STATE_SOCKS_CONNECT_COMPLETE; 700 next_state_ = STATE_SOCKS_CONNECT_COMPLETE;
701 701
702 ClientSocket* s = socket_.release(); 702 ClientSocket* s = socket_.release();
703 HostResolver::RequestInfo req_info(url_.HostNoBrackets(), 703 HostResolver::RequestInfo req_info(url_.HostNoBrackets(),
704 url_.EffectiveIntPort()); 704 url_.EffectiveIntPort());
705 705
706 if (proxy_info_.proxy_server().scheme() == ProxyServer::SCHEME_SOCKS5) 706 if (proxy_info_.proxy_server().scheme() == ProxyServer::SCHEME_SOCKS5)
707 s = new SOCKS5ClientSocket(s, req_info, NULL /*use proxy-side resolving*/); 707 s = new SOCKS5ClientSocket(s, req_info);
708 else 708 else
709 s = new SOCKSClientSocket(s, req_info, host_resolver_.get()); 709 s = new SOCKSClientSocket(s, req_info, host_resolver_.get());
710 socket_.reset(s); 710 socket_.reset(s);
711 metrics_->OnSOCKSProxy(); 711 metrics_->OnSOCKSProxy();
712 return socket_->Connect(&io_callback_, load_log_); 712 return socket_->Connect(&io_callback_, load_log_);
713 } 713 }
714 714
715 int SocketStream::DoSOCKSConnectComplete(int result) { 715 int SocketStream::DoSOCKSConnectComplete(int result) {
716 DCHECK_EQ(kSOCKSProxy, proxy_mode_); 716 DCHECK_EQ(kSOCKSProxy, proxy_mode_);
717 717
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 return context_->proxy_service(); 902 return context_->proxy_service();
903 } 903 }
904 904
905 void SocketStream::GetInfoForTracker( 905 void SocketStream::GetInfoForTracker(
906 RequestTracker<SocketStream>::RecentRequestInfo* info) const { 906 RequestTracker<SocketStream>::RecentRequestInfo* info) const {
907 info->original_url = url_; 907 info->original_url = url_;
908 info->load_log = load_log_; 908 info->load_log = load_log_;
909 } 909 }
910 910
911 } // namespace net 911 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks5_client_socket_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698