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

Unified 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: Address Andrei's comment and 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/bidirectional_stream_quic_impl.h
diff --git a/net/quic/bidirectional_stream_quic_impl.h b/net/quic/bidirectional_stream_quic_impl.h
index d314245ec57f0278a6bac1fb45fc63947fb1b41c..b29698a48e31a06c8ed9abf978b697b8250942a3 100644
--- a/net/quic/bidirectional_stream_quic_impl.h
+++ b/net/quic/bidirectional_stream_quic_impl.h
@@ -40,9 +40,10 @@ class NET_EXPORT_PRIVATE BidirectionalStreamQuicImpl
// BidirectionalStreamImpl implementation:
void Start(const BidirectionalStreamRequestInfo* request_info,
const BoundNetLog& net_log,
- bool disable_auto_flush,
+ bool send_request_headers_automatically,
BidirectionalStreamImpl::Delegate* delegate,
std::unique_ptr<base::Timer> timer) override;
+ void SendRequestHeaders() override;
int ReadData(IOBuffer* buffer, int buffer_len) override;
void SendData(const scoped_refptr<IOBuffer>& data,
int length,
@@ -72,8 +73,6 @@ class NET_EXPORT_PRIVATE BidirectionalStreamQuicImpl
void OnSendDataComplete(int rv);
void OnReadDataComplete(int rv);
- // Helper method to send request headers.
- void SendRequestHeaders();
// Notifies the delegate of an error.
void NotifyError(int error);
// Resets the stream and ensures that |delegate_| won't be called back.
@@ -112,7 +111,11 @@ class NET_EXPORT_PRIVATE BidirectionalStreamQuicImpl
// Indicates whether initial headers have been received.
bool has_received_headers_;
- bool disable_auto_flush_;
+ // Whether to automatically send request headers when stream is negotiated.
+ // If false, headers will be sent until SendRequestHeaders() is called or
mef 2016/06/01 21:33:21 will be -> will not be
xunjieli 2016/06/01 22:27:17 Done.
+ // until next SendData/SendvData, during which QUIC will try to combine header
+ // frame with data frame in the same packet if possible.
+ bool send_request_headers_automatically_;
base::WeakPtrFactory<BidirectionalStreamQuicImpl> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698