| OLD | NEW |
| 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 #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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // pushed. | 223 // pushed. |
| 224 if (push_response_info_.get()) { | 224 if (push_response_info_.get()) { |
| 225 *response = *(push_response_info_.get()); | 225 *response = *(push_response_info_.get()); |
| 226 push_response_info_.reset(); | 226 push_response_info_.reset(); |
| 227 } | 227 } |
| 228 else | 228 else |
| 229 DCHECK_EQ(static_cast<HttpResponseInfo*>(NULL), response_info_); | 229 DCHECK_EQ(static_cast<HttpResponseInfo*>(NULL), response_info_); |
| 230 | 230 |
| 231 response_info_ = response; | 231 response_info_ = response; |
| 232 | 232 |
| 233 // Put the peer's ip:port into the response, for inquisitive users. |
| 234 AddressList address; |
| 235 stream_->GetPeerAddress(&address); |
| 236 response_info_->socket_address = |
| 237 address.head() ? NetAddressToStringWithPort(address.head()) : ""; |
| 238 |
| 233 bool has_upload_data = request_body_stream_.get() != NULL; | 239 bool has_upload_data = request_body_stream_.get() != NULL; |
| 234 int result = stream_->SendRequest(has_upload_data); | 240 int result = stream_->SendRequest(has_upload_data); |
| 235 if (result == ERR_IO_PENDING) { | 241 if (result == ERR_IO_PENDING) { |
| 236 CHECK(!user_callback_); | 242 CHECK(!user_callback_); |
| 237 user_callback_ = callback; | 243 user_callback_ = callback; |
| 238 } | 244 } |
| 239 return result; | 245 return result; |
| 240 } | 246 } |
| 241 | 247 |
| 242 void SpdyHttpStream::Cancel() { | 248 void SpdyHttpStream::Cancel() { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 stream_->GetSSLInfo(ssl_info, &using_npn); | 433 stream_->GetSSLInfo(ssl_info, &using_npn); |
| 428 } | 434 } |
| 429 | 435 |
| 430 void SpdyHttpStream::GetSSLCertRequestInfo( | 436 void SpdyHttpStream::GetSSLCertRequestInfo( |
| 431 SSLCertRequestInfo* cert_request_info) { | 437 SSLCertRequestInfo* cert_request_info) { |
| 432 DCHECK(stream_); | 438 DCHECK(stream_); |
| 433 stream_->GetSSLCertRequestInfo(cert_request_info); | 439 stream_->GetSSLCertRequestInfo(cert_request_info); |
| 434 } | 440 } |
| 435 | 441 |
| 436 } // namespace net | 442 } // namespace net |
| OLD | NEW |