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 // NOTE: This code is not shared between Google and Chrome. | 5 // NOTE: This code is not shared between Google and Chrome. |
6 | 6 |
7 #ifndef NET_QUIC_QUIC_CHROMIUM_CLIENT_STREAM_H_ | 7 #ifndef NET_QUIC_QUIC_CHROMIUM_CLIENT_STREAM_H_ |
8 #define NET_QUIC_QUIC_CHROMIUM_CLIENT_STREAM_H_ | 8 #define NET_QUIC_QUIC_CHROMIUM_CLIENT_STREAM_H_ |
9 | 9 |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 bool CanWrite(const CompletionCallback& callback); | 114 bool CanWrite(const CompletionCallback& callback); |
115 | 115 |
116 const BoundNetLog& net_log() const { return net_log_; } | 116 const BoundNetLog& net_log() const { return net_log_; } |
117 | 117 |
118 // Prevents this stream from migrating to a new network. May cause other | 118 // Prevents this stream from migrating to a new network. May cause other |
119 // concurrent streams within the session to also not migrate. | 119 // concurrent streams within the session to also not migrate. |
120 void DisableConnectionMigration(); | 120 void DisableConnectionMigration(); |
121 | 121 |
122 bool can_migrate() { return can_migrate_; } | 122 bool can_migrate() { return can_migrate_; } |
123 | 123 |
| 124 // True if this stream is the first data stream created on this session. |
| 125 bool IsFirstStream(); |
| 126 |
124 using QuicSpdyStream::HasBufferedData; | 127 using QuicSpdyStream::HasBufferedData; |
125 | 128 |
126 private: | 129 private: |
127 void NotifyDelegateOfHeadersCompleteLater(SpdyHeaderBlock headers, | 130 void NotifyDelegateOfHeadersCompleteLater(SpdyHeaderBlock headers, |
128 size_t frame_len); | 131 size_t frame_len); |
129 void NotifyDelegateOfHeadersComplete(SpdyHeaderBlock headers, | 132 void NotifyDelegateOfHeadersComplete(SpdyHeaderBlock headers, |
130 size_t frame_len); | 133 size_t frame_len); |
131 void NotifyDelegateOfDataAvailableLater(); | 134 void NotifyDelegateOfDataAvailableLater(); |
132 void NotifyDelegateOfDataAvailable(); | 135 void NotifyDelegateOfDataAvailable(); |
133 void RunOrBuffer(base::Closure closure); | 136 void RunOrBuffer(base::Closure closure); |
(...skipping 14 matching lines...) Expand all Loading... |
148 std::deque<base::Closure> delegate_tasks_; | 151 std::deque<base::Closure> delegate_tasks_; |
149 | 152 |
150 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; | 153 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; |
151 | 154 |
152 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); | 155 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); |
153 }; | 156 }; |
154 | 157 |
155 } // namespace net | 158 } // namespace net |
156 | 159 |
157 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_STREAM_H_ | 160 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_STREAM_H_ |
OLD | NEW |