Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1349)

Side by Side Diff: net/quic/bidirectional_stream_quic_impl.h

Issue 1856073002: Coalesce small buffers in net::BidirectionalStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix javadoc Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 10 #include <memory>
(...skipping 21 matching lines...) Expand all
32 public QuicChromiumClientSession::Observer { 32 public QuicChromiumClientSession::Observer {
33 public: 33 public:
34 explicit BidirectionalStreamQuicImpl( 34 explicit BidirectionalStreamQuicImpl(
35 const base::WeakPtr<QuicChromiumClientSession>& session); 35 const base::WeakPtr<QuicChromiumClientSession>& session);
36 36
37 ~BidirectionalStreamQuicImpl() override; 37 ~BidirectionalStreamQuicImpl() override;
38 38
39 // BidirectionalStreamImpl implementation: 39 // BidirectionalStreamImpl implementation:
40 void Start(const BidirectionalStreamRequestInfo* request_info, 40 void Start(const BidirectionalStreamRequestInfo* request_info,
41 const BoundNetLog& net_log, 41 const BoundNetLog& net_log,
42 bool disable_auto_flush,
42 BidirectionalStreamImpl::Delegate* delegate, 43 BidirectionalStreamImpl::Delegate* delegate,
43 std::unique_ptr<base::Timer> timer) override; 44 std::unique_ptr<base::Timer> timer) override;
44 int ReadData(IOBuffer* buffer, int buffer_len) override; 45 int ReadData(IOBuffer* buffer, int buffer_len) override;
45 void SendData(IOBuffer* data, int length, bool end_stream) override; 46 void SendData(IOBuffer* data, int length, bool end_stream) override;
47 void SendvData(const std::vector<IOBuffer*>& buffers,
48 const std::vector<int>& lengths,
49 bool end_stream) override;
46 void Cancel() override; 50 void Cancel() override;
47 NextProto GetProtocol() const override; 51 NextProto GetProtocol() const override;
48 int64_t GetTotalReceivedBytes() const override; 52 int64_t GetTotalReceivedBytes() const override;
49 int64_t GetTotalSentBytes() const override; 53 int64_t GetTotalSentBytes() const override;
50 54
51 private: 55 private:
52 // QuicChromiumClientStream::Delegate implementation: 56 // QuicChromiumClientStream::Delegate implementation:
53 void OnHeadersAvailable(const SpdyHeaderBlock& headers, 57 void OnHeadersAvailable(const SpdyHeaderBlock& headers,
54 size_t frame_len) override; 58 size_t frame_len) override;
55 void OnDataAvailable() override; 59 void OnDataAvailable() override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // bytes received over the network for |stream_| while it was open. 102 // bytes received over the network for |stream_| while it was open.
99 int64_t closed_stream_received_bytes_; 103 int64_t closed_stream_received_bytes_;
100 // After |stream_| has been closed, this keeps track of the total number of 104 // After |stream_| has been closed, this keeps track of the total number of
101 // bytes sent over the network for |stream_| while it was open. 105 // bytes sent over the network for |stream_| while it was open.
102 int64_t closed_stream_sent_bytes_; 106 int64_t closed_stream_sent_bytes_;
103 // Indicates whether initial headers have been sent. 107 // Indicates whether initial headers have been sent.
104 bool has_sent_headers_; 108 bool has_sent_headers_;
105 // Indicates whether initial headers have been received. 109 // Indicates whether initial headers have been received.
106 bool has_received_headers_; 110 bool has_received_headers_;
107 111
112 bool disable_auto_flush_;
113
108 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_; 114 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_;
109 115
110 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl); 116 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl);
111 }; 117 };
112 118
113 } // namespace net 119 } // namespace net
114 120
115 #endif // NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 121 #endif // NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | net/quic/bidirectional_stream_quic_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698