| 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_stream.h" | 5 #include "net/spdy/spdy_stream.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 if (delegate) | 527 if (delegate) |
| 528 delegate->OnClose(status); | 528 delegate->OnClose(status); |
| 529 } | 529 } |
| 530 | 530 |
| 531 void SpdyStream::Cancel() { | 531 void SpdyStream::Cancel() { |
| 532 if (cancelled()) | 532 if (cancelled()) |
| 533 return; | 533 return; |
| 534 | 534 |
| 535 cancelled_ = true; | 535 cancelled_ = true; |
| 536 if (session_->IsStreamActive(stream_id_)) | 536 if (session_->IsStreamActive(stream_id_)) |
| 537 session_->ResetStream(stream_id_, RST_STREAM_CANCEL, ""); | 537 session_->ResetStream(stream_id_, RST_STREAM_CANCEL, std::string()); |
| 538 else if (stream_id_ == 0) | 538 else if (stream_id_ == 0) |
| 539 session_->CloseCreatedStream(this, RST_STREAM_CANCEL); | 539 session_->CloseCreatedStream(this, RST_STREAM_CANCEL); |
| 540 } | 540 } |
| 541 | 541 |
| 542 void SpdyStream::Close() { | 542 void SpdyStream::Close() { |
| 543 if (stream_id_ != 0) | 543 if (stream_id_ != 0) |
| 544 session_->CloseStream(stream_id_, net::OK); | 544 session_->CloseStream(stream_id_, net::OK); |
| 545 else | 545 else |
| 546 session_->CloseCreatedStream(this, OK); | 546 session_->CloseCreatedStream(this, OK); |
| 547 } | 547 } |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 } | 904 } |
| 905 | 905 |
| 906 recv_window_size_ -= delta_window_size; | 906 recv_window_size_ -= delta_window_size; |
| 907 net_log_.AddEvent( | 907 net_log_.AddEvent( |
| 908 NetLog::TYPE_SPDY_STREAM_UPDATE_RECV_WINDOW, | 908 NetLog::TYPE_SPDY_STREAM_UPDATE_RECV_WINDOW, |
| 909 base::Bind(&NetLogSpdyStreamWindowUpdateCallback, | 909 base::Bind(&NetLogSpdyStreamWindowUpdateCallback, |
| 910 stream_id_, -delta_window_size, recv_window_size_)); | 910 stream_id_, -delta_window_size, recv_window_size_)); |
| 911 } | 911 } |
| 912 | 912 |
| 913 } // namespace net | 913 } // namespace net |
| OLD | NEW |