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

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

Issue 1992953004: [Cronet] Make delaying sending request headers explicit in bidirectional stream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 years, 7 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 bool delay_headers_until_next_send_data,
43 BidirectionalStreamImpl::Delegate* delegate, 43 BidirectionalStreamImpl::Delegate* delegate,
44 std::unique_ptr<base::Timer> timer) override; 44 std::unique_ptr<base::Timer> timer) override;
45 int ReadData(IOBuffer* buffer, int buffer_len) override; 45 int ReadData(IOBuffer* buffer, int buffer_len) override;
46 void SendData(const scoped_refptr<IOBuffer>& data, 46 void SendData(const scoped_refptr<IOBuffer>& data,
47 int length, 47 int length,
48 bool end_stream) override; 48 bool end_stream) override;
49 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers, 49 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers,
50 const std::vector<int>& lengths, 50 const std::vector<int>& lengths,
51 bool end_stream) override; 51 bool end_stream) override;
52 void Cancel() override; 52 void Cancel() override;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // bytes received over the network for |stream_| while it was open. 104 // bytes received over the network for |stream_| while it was open.
105 int64_t closed_stream_received_bytes_; 105 int64_t closed_stream_received_bytes_;
106 // After |stream_| has been closed, this keeps track of the total number of 106 // After |stream_| has been closed, this keeps track of the total number of
107 // bytes sent over the network for |stream_| while it was open. 107 // bytes sent over the network for |stream_| while it was open.
108 int64_t closed_stream_sent_bytes_; 108 int64_t closed_stream_sent_bytes_;
109 // Indicates whether initial headers have been sent. 109 // Indicates whether initial headers have been sent.
110 bool has_sent_headers_; 110 bool has_sent_headers_;
111 // Indicates whether initial headers have been received. 111 // Indicates whether initial headers have been received.
112 bool has_received_headers_; 112 bool has_received_headers_;
113 113
114 bool disable_auto_flush_; 114 // Whether to delay sending request headers until next SendData/SendvData,
115 // so header frame can be coalesced with data frame in the same packet.
116 bool delay_headers_until_next_send_data_;
115 117
116 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_; 118 base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_;
117 119
118 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl); 120 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamQuicImpl);
119 }; 121 };
120 122
121 } // namespace net 123 } // namespace net
122 124
123 #endif // NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_ 125 #endif // NET_QUIC_BIDIRECTIONAL_STREAM_QUIC_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698