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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 stream_->GetProtocolVersion(), direct_, | 266 stream_->GetProtocolVersion(), direct_, |
267 headers.get()); | 267 headers.get()); |
268 stream_->net_log().AddEvent( | 268 stream_->net_log().AddEvent( |
269 NetLog::TYPE_HTTP_TRANSACTION_HTTP2_SEND_REQUEST_HEADERS, | 269 NetLog::TYPE_HTTP_TRANSACTION_HTTP2_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) { |
278 CHECK(callback_.is_null()); | 278 CHECK(callback_.is_null()); |
279 callback_ = callback; | 279 callback_ = callback; |
280 } | 280 } |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 Close(false); | 530 Close(false); |
531 delete this; | 531 delete this; |
532 } | 532 } |
533 | 533 |
534 void SpdyHttpStream::SetPriority(RequestPriority priority) { | 534 void SpdyHttpStream::SetPriority(RequestPriority priority) { |
535 // TODO(akalin): Plumb this through to |stream_request_| and | 535 // TODO(akalin): Plumb this through to |stream_request_| and |
536 // |stream_|. | 536 // |stream_|. |
537 } | 537 } |
538 | 538 |
539 } // namespace net | 539 } // namespace net |
OLD | NEW |