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

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

Issue 10491007: fixed issue 128383 - replace GetPeerAddress(AddressList* address) with GetPeerAddress(IPEndPoint* a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix according to review Created 8 years, 6 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 if (push_response_info_.get()) { 243 if (push_response_info_.get()) {
244 *response = *(push_response_info_.get()); 244 *response = *(push_response_info_.get());
245 push_response_info_.reset(); 245 push_response_info_.reset();
246 } 246 }
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 IPEndPoint 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 = 257 response_info_->socket_address = HostPortPair::FromIPEndPoint(address);
258 HostPortPair::FromIPEndPoint(address.front());
259 258
260 bool has_upload_data = request_body_stream_.get() != NULL; 259 bool has_upload_data = request_body_stream_.get() != NULL;
261 result = stream_->SendRequest(has_upload_data); 260 result = stream_->SendRequest(has_upload_data);
262 if (result == ERR_IO_PENDING) { 261 if (result == ERR_IO_PENDING) {
263 CHECK(callback_.is_null()); 262 CHECK(callback_.is_null());
264 callback_ = callback; 263 callback_ = callback;
265 } 264 }
266 return result; 265 return result;
267 } 266 }
268 267
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 bool SpdyHttpStream::IsSpdyHttpStream() const { 506 bool SpdyHttpStream::IsSpdyHttpStream() const {
508 return true; 507 return true;
509 } 508 }
510 509
511 void SpdyHttpStream::Drain(HttpNetworkSession* session) { 510 void SpdyHttpStream::Drain(HttpNetworkSession* session) {
512 Close(false); 511 Close(false);
513 delete this; 512 delete this;
514 } 513 }
515 514
516 } // namespace net 515 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/transport_client_socket_pool_unittest.cc ('k') | net/spdy/spdy_proxy_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698