| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ | 5 #ifndef NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ |
| 6 #define NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ | 6 #define NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 public QuicChromiumClientSession::Observer { | 31 public QuicChromiumClientSession::Observer { |
| 32 public: | 32 public: |
| 33 explicit BidirectionalStreamQuicImpl( | 33 explicit BidirectionalStreamQuicImpl( |
| 34 const base::WeakPtr<QuicChromiumClientSession>& session); | 34 const base::WeakPtr<QuicChromiumClientSession>& session); |
| 35 | 35 |
| 36 ~BidirectionalStreamQuicImpl() override; | 36 ~BidirectionalStreamQuicImpl() override; |
| 37 | 37 |
| 38 // BidirectionalStreamImpl implementation: | 38 // BidirectionalStreamImpl implementation: |
| 39 void Start(const BidirectionalStreamRequestInfo* request_info, | 39 void Start(const BidirectionalStreamRequestInfo* request_info, |
| 40 const BoundNetLog& net_log, | 40 const BoundNetLog& net_log, |
| 41 bool disable_auto_flush, |
| 41 BidirectionalStreamImpl::Delegate* delegate, | 42 BidirectionalStreamImpl::Delegate* delegate, |
| 42 scoped_ptr<base::Timer> timer) override; | 43 scoped_ptr<base::Timer> timer) override; |
| 43 int ReadData(IOBuffer* buffer, int buffer_len) override; | 44 int ReadData(IOBuffer* buffer, int buffer_len) override; |
| 44 void SendData(IOBuffer* data, int length, bool end_stream) override; | 45 void SendData(IOBuffer* data, int length, bool end_stream) override; |
| 46 void SendvData(const std::vector<IOBuffer*>& buffers, |
| 47 const std::vector<int>& lengths, |
| 48 bool end_stream) override; |
| 45 void Cancel() override; | 49 void Cancel() override; |
| 46 NextProto GetProtocol() const override; | 50 NextProto GetProtocol() const override; |
| 47 int64_t GetTotalReceivedBytes() const override; | 51 int64_t GetTotalReceivedBytes() const override; |
| 48 int64_t GetTotalSentBytes() const override; | 52 int64_t GetTotalSentBytes() const override; |
| 49 | 53 |
| 50 private: | 54 private: |
| 51 // QuicChromiumClientStream::Delegate implementation: | 55 // QuicChromiumClientStream::Delegate implementation: |
| 52 void OnHeadersAvailable(const SpdyHeaderBlock& headers, | 56 void OnHeadersAvailable(const SpdyHeaderBlock& headers, |
| 53 size_t frame_len) override; | 57 size_t frame_len) override; |
| 54 void OnDataAvailable() override; | 58 void OnDataAvailable() override; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // bytes received over the network for |stream_| while it was open. | 101 // bytes received over the network for |stream_| while it was open. |
| 98 int64_t closed_stream_received_bytes_; | 102 int64_t closed_stream_received_bytes_; |
| 99 // After |stream_| has been closed, this keeps track of the total number of | 103 // After |stream_| has been closed, this keeps track of the total number of |
| 100 // bytes sent over the network for |stream_| while it was open. | 104 // bytes sent over the network for |stream_| while it was open. |
| 101 int64_t closed_stream_sent_bytes_; | 105 int64_t closed_stream_sent_bytes_; |
| 102 // Indicates whether initial headers have been sent. | 106 // Indicates whether initial headers have been sent. |
| 103 bool has_sent_headers_; | 107 bool has_sent_headers_; |
| 104 // Indicates whether initial headers have been received. | 108 // Indicates whether initial headers have been received. |
| 105 bool has_received_headers_; | 109 bool has_received_headers_; |
| 106 | 110 |
| 111 bool disable_auto_flush_; |
| 112 |
| 107 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_; | 113 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_; |
| 108 | 114 |
| 109 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl); | 115 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl); |
| 110 }; | 116 }; |
| 111 | 117 |
| 112 } // namespace net | 118 } // namespace net |
| 113 | 119 |
| 114 #endif // NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ | 120 #endif // NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ |
| OLD | NEW |