| OLD | NEW |
| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 UploadDataStream* request_body, | 191 UploadDataStream* request_body, |
| 192 HttpResponseInfo* response, | 192 HttpResponseInfo* response, |
| 193 const CompletionCallback& callback) { | 193 const CompletionCallback& callback) { |
| 194 base::Time request_time = base::Time::Now(); | 194 base::Time request_time = base::Time::Now(); |
| 195 CHECK(stream_.get()); | 195 CHECK(stream_.get()); |
| 196 | 196 |
| 197 stream_->SetDelegate(this); | 197 stream_->SetDelegate(this); |
| 198 | 198 |
| 199 linked_ptr<spdy::SpdyHeaderBlock> headers(new spdy::SpdyHeaderBlock); | 199 linked_ptr<spdy::SpdyHeaderBlock> headers(new spdy::SpdyHeaderBlock); |
| 200 CreateSpdyHeadersFromHttpRequest(*request_info_, request_headers, | 200 CreateSpdyHeadersFromHttpRequest(*request_info_, request_headers, |
| 201 headers.get(), direct_); | 201 headers.get(), stream_->GetProtocolVersion(), |
| 202 direct_); |
| 202 stream_->set_spdy_headers(headers); | 203 stream_->set_spdy_headers(headers); |
| 203 | 204 |
| 204 stream_->SetRequestTime(request_time); | 205 stream_->SetRequestTime(request_time); |
| 205 // This should only get called in the case of a request occurring | 206 // This should only get called in the case of a request occurring |
| 206 // during server push that has already begun but hasn't finished, | 207 // during server push that has already begun but hasn't finished, |
| 207 // so we set the response's request time to be the actual one | 208 // so we set the response's request time to be the actual one |
| 208 if (response_info_) | 209 if (response_info_) |
| 209 response_info_->request_time = request_time; | 210 response_info_->request_time = request_time; |
| 210 | 211 |
| 211 CHECK(!request_body_stream_.get()); | 212 CHECK(!request_body_stream_.get()); |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |