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

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

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get_canonical_name -> canonical_name. iterator to indexing Created 8 years, 7 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_stream/socket_stream.h ('k') | net/spdy/spdy_http_stream.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <set> 10 #include <set>
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 FROM_HERE, 271 FROM_HERE,
272 base::Bind(&SocketStream::DoLoop, this, OK)); 272 base::Bind(&SocketStream::DoLoop, this, OK));
273 } 273 }
274 274
275 SocketStream::~SocketStream() { 275 SocketStream::~SocketStream() {
276 set_context(NULL); 276 set_context(NULL);
277 DCHECK(!delegate_); 277 DCHECK(!delegate_);
278 DCHECK(!pac_request_); 278 DCHECK(!pac_request_);
279 } 279 }
280 280
281 void SocketStream::CopyAddrInfo(struct addrinfo* head) { 281 void SocketStream::set_addresses(const AddressList& addresses) {
282 addresses_ = AddressList::CreateByCopying(head); 282 addresses_ = addresses;
283 } 283 }
284 284
285 void SocketStream::DoClose() { 285 void SocketStream::DoClose() {
286 closing_ = true; 286 closing_ = true;
287 // If next_state_ is STATE_TCP_CONNECT, it's waiting other socket 287 // If next_state_ is STATE_TCP_CONNECT, it's waiting other socket
288 // establishing connection. If next_state_ is STATE_AUTH_REQUIRED, it's 288 // establishing connection. If next_state_ is STATE_AUTH_REQUIRED, it's
289 // waiting for restarting. In these states, we'll close the SocketStream 289 // waiting for restarting. In these states, we'll close the SocketStream
290 // now. 290 // now.
291 if (next_state_ == STATE_TCP_CONNECT || next_state_ == STATE_AUTH_REQUIRED) { 291 if (next_state_ == STATE_TCP_CONNECT || next_state_ == STATE_AUTH_REQUIRED) {
292 DoLoop(ERR_ABORTED); 292 DoLoop(ERR_ABORTED);
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 1216
1217 SSLConfigService* SocketStream::ssl_config_service() const { 1217 SSLConfigService* SocketStream::ssl_config_service() const {
1218 return context_->ssl_config_service(); 1218 return context_->ssl_config_service();
1219 } 1219 }
1220 1220
1221 ProxyService* SocketStream::proxy_service() const { 1221 ProxyService* SocketStream::proxy_service() const {
1222 return context_->proxy_service(); 1222 return context_->proxy_service();
1223 } 1223 }
1224 1224
1225 } // namespace net 1225 } // namespace net
OLDNEW
« no previous file with comments | « net/socket_stream/socket_stream.h ('k') | net/spdy/spdy_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698