| 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 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 if (stream_->type() == SPDY_PUSH_STREAM) { | 256 if (stream_->type() == SPDY_PUSH_STREAM) { |
| 257 // Pushed streams do not send any data, and should always be | 257 // Pushed streams do not send any data, and should always be |
| 258 // idle. However, we still want to return ERR_IO_PENDING to mimic | 258 // idle. However, we still want to return ERR_IO_PENDING to mimic |
| 259 // non-push behavior. The callback will be called when the | 259 // non-push behavior. The callback will be called when the |
| 260 // response is received. | 260 // response is received. |
| 261 result = ERR_IO_PENDING; | 261 result = ERR_IO_PENDING; |
| 262 } else { | 262 } else { |
| 263 scoped_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock); | 263 scoped_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock); |
| 264 CreateSpdyHeadersFromHttpRequest( | 264 CreateSpdyHeadersFromHttpRequest( |
| 265 *request_info_, request_headers, | 265 *request_info_, request_headers, |
| 266 headers.get(), stream_->GetProtocolVersion(), | 266 stream_->GetProtocolVersion(), direct_, |
| 267 direct_); | 267 headers.get()); |
| 268 stream_->net_log().AddEvent( | 268 stream_->net_log().AddEvent( |
| 269 NetLog::TYPE_HTTP_TRANSACTION_SPDY_SEND_REQUEST_HEADERS, | 269 NetLog::TYPE_HTTP_TRANSACTION_SPDY_SEND_REQUEST_HEADERS, |
| 270 base::Bind(&SpdyHeaderBlockNetLogCallback, headers.get())); | 270 base::Bind(&SpdyHeaderBlockNetLogCallback, headers.get())); |
| 271 result = | 271 result = |
| 272 stream_->SendRequestHeaders( | 272 stream_->SendRequestHeaders( |
| 273 headers.Pass(), | 273 headers.Pass(), |
| 274 HasUploadData() ? MORE_DATA_TO_SEND : NO_MORE_DATA_TO_SEND); | 274 HasUploadData() ? MORE_DATA_TO_SEND : NO_MORE_DATA_TO_SEND); |
| 275 } | 275 } |
| 276 | 276 |
| 277 if (result == ERR_IO_PENDING) { | 277 if (result == ERR_IO_PENDING) { |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 Close(false); | 528 Close(false); |
| 529 delete this; | 529 delete this; |
| 530 } | 530 } |
| 531 | 531 |
| 532 void SpdyHttpStream::SetPriority(RequestPriority priority) { | 532 void SpdyHttpStream::SetPriority(RequestPriority priority) { |
| 533 // TODO(akalin): Plumb this through to |stream_request_| and | 533 // TODO(akalin): Plumb this through to |stream_request_| and |
| 534 // |stream_|. | 534 // |stream_|. |
| 535 } | 535 } |
| 536 | 536 |
| 537 } // namespace net | 537 } // namespace net |
| OLD | NEW |