| 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_RELIABLE_CLIENT_STREAM_H_ | 7 #ifndef NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ |
| 8 #define NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ | 8 #define NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ |
| 9 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 // While the server's set_priority shouldn't be called externally, the creator | 76 // While the server's set_priority shouldn't be called externally, the creator |
| 77 // of client-side streams should be able to set the priority. | 77 // of client-side streams should be able to set the priority. |
| 78 using QuicSpdyStream::SetPriority; | 78 using QuicSpdyStream::SetPriority; |
| 79 | 79 |
| 80 int WriteStreamData(base::StringPiece data, | 80 int WriteStreamData(base::StringPiece data, |
| 81 bool fin, | 81 bool fin, |
| 82 const CompletionCallback& callback); | 82 const CompletionCallback& callback); |
| 83 // Same as WriteStreamData except it writes data from a vector of IOBuffers, | 83 // Same as WriteStreamData except it writes data from a vector of IOBuffers, |
| 84 // with the length of each buffer at the corresponding index in |lengths|. | 84 // with the length of each buffer at the corresponding index in |lengths|. |
| 85 int WritevStreamData(const std::vector<IOBuffer*>& buffers, | 85 int WritevStreamData(const std::vector<scoped_refptr<IOBuffer>>& buffers, |
| 86 const std::vector<int>& lengths, | 86 const std::vector<int>& lengths, |
| 87 bool fin, | 87 bool fin, |
| 88 const CompletionCallback& callback); | 88 const CompletionCallback& callback); |
| 89 // Set new |delegate|. |delegate| must not be NULL. | 89 // Set new |delegate|. |delegate| must not be NULL. |
| 90 // If this stream has already received data, OnDataReceived() will be | 90 // If this stream has already received data, OnDataReceived() will be |
| 91 // called on the delegate. | 91 // called on the delegate. |
| 92 void SetDelegate(Delegate* delegate); | 92 void SetDelegate(Delegate* delegate); |
| 93 Delegate* GetDelegate() { return delegate_; } | 93 Delegate* GetDelegate() { return delegate_; } |
| 94 void OnError(int error); | 94 void OnError(int error); |
| 95 | 95 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 std::deque<base::Closure> delegate_tasks_; | 137 std::deque<base::Closure> delegate_tasks_; |
| 138 | 138 |
| 139 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; | 139 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; |
| 140 | 140 |
| 141 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); | 141 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 } // namespace net | 144 } // namespace net |
| 145 | 145 |
| 146 #endif // NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ | 146 #endif // NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ |
| OLD | NEW |