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 "net/base/net_errors.h" | 7 #include "net/base/net_errors.h" |
8 #include "net/quic/quic_session.h" | 8 #include "net/quic/quic_session.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
11 | 11 |
12 QuicReliableClientStream::QuicReliableClientStream(QuicStreamId id, | 12 QuicReliableClientStream::QuicReliableClientStream(QuicStreamId id, |
13 QuicSession* session, | 13 QuicSession* session) |
14 const BoundNetLog& net_log) | |
15 : ReliableQuicStream(id, session), | 14 : ReliableQuicStream(id, session), |
16 net_log_(net_log), | |
17 delegate_(NULL) { | 15 delegate_(NULL) { |
18 } | 16 } |
19 | 17 |
20 QuicReliableClientStream::~QuicReliableClientStream() { | 18 QuicReliableClientStream::~QuicReliableClientStream() { |
21 if (delegate_) | 19 if (delegate_) |
22 delegate_->OnClose(error()); | 20 delegate_->OnClose(error()); |
23 } | 21 } |
24 | 22 |
25 uint32 QuicReliableClientStream::ProcessData(const char* data, | 23 uint32 QuicReliableClientStream::ProcessData(const char* data, |
26 uint32 data_len) { | 24 uint32 data_len) { |
(...skipping 26 matching lines...) Expand all Loading... |
53 | 51 |
54 void QuicReliableClientStream::OnError(int error) { | 52 void QuicReliableClientStream::OnError(int error) { |
55 if (delegate_) { | 53 if (delegate_) { |
56 QuicReliableClientStream::Delegate* delegate = delegate_; | 54 QuicReliableClientStream::Delegate* delegate = delegate_; |
57 delegate_ = NULL; | 55 delegate_ = NULL; |
58 delegate->OnError(error); | 56 delegate->OnError(error); |
59 } | 57 } |
60 } | 58 } |
61 | 59 |
62 } // namespace net | 60 } // namespace net |
OLD | NEW |