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

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: Responded to review. 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.cc ('k') | net/spdy/spdy_session_pool.h » ('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 #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 =
258 HostPortPair::FromIPEndPoint(address.front());
eroman 2012/05/04 19:37:36 nit: indent continued lines by 4.
258 259
259 bool has_upload_data = request_body_stream_.get() != NULL; 260 bool has_upload_data = request_body_stream_.get() != NULL;
260 result = stream_->SendRequest(has_upload_data); 261 result = stream_->SendRequest(has_upload_data);
261 if (result == ERR_IO_PENDING) { 262 if (result == ERR_IO_PENDING) {
262 CHECK(callback_.is_null()); 263 CHECK(callback_.is_null());
263 callback_ = callback; 264 callback_ = callback;
264 } 265 }
265 return result; 266 return result;
266 } 267 }
267 268
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 bool SpdyHttpStream::IsSpdyHttpStream() const { 507 bool SpdyHttpStream::IsSpdyHttpStream() const {
507 return true; 508 return true;
508 } 509 }
509 510
510 void SpdyHttpStream::Drain(HttpNetworkSession* session) { 511 void SpdyHttpStream::Drain(HttpNetworkSession* session) {
511 Close(false); 512 Close(false);
512 delete this; 513 delete this;
513 } 514 }
514 515
515 } // namespace net 516 } // namespace net
OLDNEW
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | net/spdy/spdy_session_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698