| 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 "net/base/ip_endpoint.h" | 10 #include "net/base/ip_endpoint.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 virtual void OnError(int error) = 0; | 49 virtual void OnError(int error) = 0; |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 virtual ~Delegate() {} | 52 virtual ~Delegate() {} |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(Delegate); | 55 DISALLOW_COPY_AND_ASSIGN(Delegate); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 QuicReliableClientStream(QuicStreamId id, | 58 QuicReliableClientStream(QuicStreamId id, |
| 59 QuicSession* session); | 59 QuicSession* session, |
| 60 const BoundNetLog& net_log); |
| 60 | 61 |
| 61 virtual ~QuicReliableClientStream(); | 62 virtual ~QuicReliableClientStream(); |
| 62 | 63 |
| 63 // ReliableQuicStream | 64 // ReliableQuicStream |
| 64 virtual uint32 ProcessData(const char* data, uint32 data_len) OVERRIDE; | 65 virtual uint32 ProcessData(const char* data, uint32 data_len) OVERRIDE; |
| 65 virtual void TerminateFromPeer(bool half_close) OVERRIDE; | 66 virtual void TerminateFromPeer(bool half_close) OVERRIDE; |
| 66 using ReliableQuicStream::WriteData; | 67 using ReliableQuicStream::WriteData; |
| 67 | 68 |
| 68 // Set new |delegate|. |delegate| must not be NULL. | 69 // Set new |delegate|. |delegate| must not be NULL. |
| 69 // If this stream has already received data, OnDataReceived() will be | 70 // If this stream has already received data, OnDataReceived() will be |
| 70 // called on the delegate. | 71 // called on the delegate. |
| 71 void SetDelegate(Delegate* delegate); | 72 void SetDelegate(Delegate* delegate); |
| 72 Delegate* GetDelegate() { return delegate_; } | 73 Delegate* GetDelegate() { return delegate_; } |
| 73 void OnError(int error); | 74 void OnError(int error); |
| 74 | 75 |
| 76 const BoundNetLog& net_log() const { return net_log_; } |
| 77 |
| 75 private: | 78 private: |
| 79 BoundNetLog net_log_; |
| 76 Delegate* delegate_; | 80 Delegate* delegate_; |
| 77 | 81 |
| 78 DISALLOW_COPY_AND_ASSIGN(QuicReliableClientStream); | 82 DISALLOW_COPY_AND_ASSIGN(QuicReliableClientStream); |
| 79 }; | 83 }; |
| 80 | 84 |
| 81 } // namespace net | 85 } // namespace net |
| 82 | 86 |
| 83 #endif // NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ | 87 #endif // NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ |
| OLD | NEW |