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

Side by Side Diff: net/spdy/spdy_http_stream.cc

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_EXPORT to *PortOnAddressList. 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
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 #include "net/spdy/spdy_http_stream.h" 5 #include "net/spdy/spdy_http_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 else 247 else
248 DCHECK_EQ(static_cast<HttpResponseInfo*>(NULL), response_info_); 248 DCHECK_EQ(static_cast<HttpResponseInfo*>(NULL), response_info_);
249 249
250 response_info_ = response; 250 response_info_ = response;
251 251
252 // Put the peer's IP address and port into the response. 252 // Put the peer's IP address and port into the response.
253 AddressList address; 253 AddressList address;
254 int result = stream_->GetPeerAddress(&address); 254 int result = stream_->GetPeerAddress(&address);
255 if (result != OK) 255 if (result != OK)
256 return result; 256 return result;
257 response_info_->socket_address = HostPortPair::FromAddrInfo(address.head()); 257 response_info_->socket_address = HostPortPair::FromIPEndPoint(address[0]);
eroman 2012/05/04 01:08:41 nit: [0] vs front(). I guess front() might make it
258 258
259 bool has_upload_data = request_body_stream_.get() != NULL; 259 bool has_upload_data = request_body_stream_.get() != NULL;
260 result = stream_->SendRequest(has_upload_data); 260 result = stream_->SendRequest(has_upload_data);
261 if (result == ERR_IO_PENDING) { 261 if (result == ERR_IO_PENDING) {
262 CHECK(callback_.is_null()); 262 CHECK(callback_.is_null());
263 callback_ = callback; 263 callback_ = callback;
264 } 264 }
265 return result; 265 return result;
266 } 266 }
267 267
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 bool SpdyHttpStream::IsSpdyHttpStream() const { 506 bool SpdyHttpStream::IsSpdyHttpStream() const {
507 return true; 507 return true;
508 } 508 }
509 509
510 void SpdyHttpStream::Drain(HttpNetworkSession* session) { 510 void SpdyHttpStream::Drain(HttpNetworkSession* session) {
511 Close(false); 511 Close(false);
512 delete this; 512 delete this;
513 } 513 }
514 514
515 } // namespace net 515 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698