Chromium Code Reviews| 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 // Returns whether a stream with |id| is the first data stream created on a | |
| 125 // QUIC session. | |
| 126 static bool isFirstStream(QuicStreamId id); | |
|
Ryan Hamilton
2016/09/09 22:05:39
Instead of making this a static method, let's make
Ryan Hamilton
2016/09/09 22:05:39
I think this method should be "IsFirst", not "isFi
xunjieli
2016/09/12 16:07:23
If we only use a bool, there is no way to differen
| |
| 127 | |
| 124 using QuicSpdyStream::HasBufferedData; | 128 using QuicSpdyStream::HasBufferedData; |
| 125 | 129 |
| 126 private: | 130 private: |
| 127 void NotifyDelegateOfHeadersCompleteLater(SpdyHeaderBlock headers, | 131 void NotifyDelegateOfHeadersCompleteLater(SpdyHeaderBlock headers, |
| 128 size_t frame_len); | 132 size_t frame_len); |
| 129 void NotifyDelegateOfHeadersComplete(SpdyHeaderBlock headers, | 133 void NotifyDelegateOfHeadersComplete(SpdyHeaderBlock headers, |
| 130 size_t frame_len); | 134 size_t frame_len); |
| 131 void NotifyDelegateOfDataAvailableLater(); | 135 void NotifyDelegateOfDataAvailableLater(); |
| 132 void NotifyDelegateOfDataAvailable(); | 136 void NotifyDelegateOfDataAvailable(); |
| 133 void RunOrBuffer(base::Closure closure); | 137 void RunOrBuffer(base::Closure closure); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 148 std::deque<base::Closure> delegate_tasks_; | 152 std::deque<base::Closure> delegate_tasks_; |
| 149 | 153 |
| 150 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; | 154 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; |
| 151 | 155 |
| 152 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); | 156 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); |
| 153 }; | 157 }; |
| 154 | 158 |
| 155 } // namespace net | 159 } // namespace net |
| 156 | 160 |
| 157 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_STREAM_H_ | 161 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_STREAM_H_ |
| OLD | NEW |