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

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

Issue 598071: Really connect to the same server in FTP network transaction. (Closed)
Patch Set: updates 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
« no previous file with comments | « net/socket/tcp_client_socket_win.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) 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 // 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 host_resolver_ = host_resolver; 245 host_resolver_ = host_resolver;
246 } 246 }
247 247
248 void SocketStream::SetClientSocketFactory( 248 void SocketStream::SetClientSocketFactory(
249 ClientSocketFactory* factory) { 249 ClientSocketFactory* factory) {
250 DCHECK(factory); 250 DCHECK(factory);
251 factory_ = factory; 251 factory_ = factory;
252 } 252 }
253 253
254 void SocketStream::CopyAddrInfo(struct addrinfo* head) { 254 void SocketStream::CopyAddrInfo(struct addrinfo* head) {
255 addresses_.Copy(head); 255 addresses_.Copy(head, true);
256 } 256 }
257 257
258 int SocketStream::DidEstablishConnection() { 258 int SocketStream::DidEstablishConnection() {
259 if (!socket_.get() || !socket_->IsConnected()) { 259 if (!socket_.get() || !socket_->IsConnected()) {
260 next_state_ = STATE_CLOSE; 260 next_state_ = STATE_CLOSE;
261 return ERR_CONNECTION_FAILED; 261 return ERR_CONNECTION_FAILED;
262 } 262 }
263 next_state_ = STATE_READ_WRITE; 263 next_state_ = STATE_READ_WRITE;
264 metrics_->OnConnected(); 264 metrics_->OnConnected();
265 265
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 return context_->proxy_service(); 949 return context_->proxy_service();
950 } 950 }
951 951
952 void SocketStream::GetInfoForTracker( 952 void SocketStream::GetInfoForTracker(
953 RequestTracker<SocketStream>::RecentRequestInfo* info) const { 953 RequestTracker<SocketStream>::RecentRequestInfo* info) const {
954 info->original_url = url_; 954 info->original_url = url_;
955 info->load_log = load_log_; 955 info->load_log = load_log_;
956 } 956 }
957 957
958 } // namespace net 958 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698