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/quic/quic_reliable_client_stream.h" | 5 #include "net/quic/quic_reliable_client_stream.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
9 #include "net/quic/quic_spdy_session.h" | 9 #include "net/quic/quic_spdy_session.h" |
10 #include "net/quic/quic_write_blocked_list.h" | 10 #include "net/quic/quic_write_blocked_list.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 if (delegate_) { | 103 if (delegate_) { |
104 QuicReliableClientStream::Delegate* delegate = delegate_; | 104 QuicReliableClientStream::Delegate* delegate = delegate_; |
105 delegate_ = nullptr; | 105 delegate_ = nullptr; |
106 delegate->OnError(error); | 106 delegate->OnError(error); |
107 } | 107 } |
108 } | 108 } |
109 | 109 |
110 bool QuicReliableClientStream::CanWrite(const CompletionCallback& callback) { | 110 bool QuicReliableClientStream::CanWrite(const CompletionCallback& callback) { |
111 bool can_write = session()->connection()->CanWrite(HAS_RETRANSMITTABLE_DATA); | 111 bool can_write = session()->connection()->CanWrite(HAS_RETRANSMITTABLE_DATA); |
112 if (!can_write) { | 112 if (!can_write) { |
113 session()->MarkWriteBlocked(id(), EffectivePriority()); | 113 session()->MarkConnectionLevelWriteBlocked(id(), EffectivePriority()); |
114 DCHECK(callback_.is_null()); | 114 DCHECK(callback_.is_null()); |
115 callback_ = callback; | 115 callback_ = callback; |
116 } | 116 } |
117 return can_write; | 117 return can_write; |
118 } | 118 } |
119 | 119 |
120 } // namespace net | 120 } // namespace net |
OLD | NEW |