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

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

Issue 552164: Merge 34903, 34928, 35008, 35549, 36054 to the 249s branch.... (Closed) Base URL: svn://chrome-svn/chrome/branches/249s/src/
Patch Set: Fix some other merge conflicts Created 10 years, 10 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/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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 int SocketStream::DoSOCKSConnect() { 681 int SocketStream::DoSOCKSConnect() {
682 DCHECK_EQ(kSOCKSProxy, proxy_mode_); 682 DCHECK_EQ(kSOCKSProxy, proxy_mode_);
683 683
684 next_state_ = STATE_SOCKS_CONNECT_COMPLETE; 684 next_state_ = STATE_SOCKS_CONNECT_COMPLETE;
685 685
686 ClientSocket* s = socket_.release(); 686 ClientSocket* s = socket_.release();
687 HostResolver::RequestInfo req_info(url_.HostNoBrackets(), 687 HostResolver::RequestInfo req_info(url_.HostNoBrackets(),
688 url_.EffectiveIntPort()); 688 url_.EffectiveIntPort());
689 689
690 if (proxy_info_.proxy_server().scheme() == ProxyServer::SCHEME_SOCKS5) 690 if (proxy_info_.proxy_server().scheme() == ProxyServer::SCHEME_SOCKS5)
691 s = new SOCKS5ClientSocket(s, req_info, host_resolver_.get()); 691 s = new SOCKS5ClientSocket(s, req_info);
692 else 692 else
693 s = new SOCKSClientSocket(s, req_info, host_resolver_.get()); 693 s = new SOCKSClientSocket(s, req_info, host_resolver_.get());
694 socket_.reset(s); 694 socket_.reset(s);
695 metrics_->OnSOCKSProxy(); 695 metrics_->OnSOCKSProxy();
696 return socket_->Connect(&io_callback_, load_log_); 696 return socket_->Connect(&io_callback_, load_log_);
697 } 697 }
698 698
699 int SocketStream::DoSOCKSConnectComplete(int result) { 699 int SocketStream::DoSOCKSConnectComplete(int result) {
700 DCHECK_EQ(kSOCKSProxy, proxy_mode_); 700 DCHECK_EQ(kSOCKSProxy, proxy_mode_);
701 701
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 return context_->proxy_service(); 886 return context_->proxy_service();
887 } 887 }
888 888
889 void SocketStream::GetInfoForTracker( 889 void SocketStream::GetInfoForTracker(
890 RequestTracker<SocketStream>::RecentRequestInfo* info) const { 890 RequestTracker<SocketStream>::RecentRequestInfo* info) const {
891 info->original_url = url_; 891 info->original_url = url_;
892 info->load_log = load_log_; 892 info->load_log = load_log_;
893 } 893 }
894 894
895 } // namespace net 895 } // 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