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

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: correct a typo 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
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7a3e6658a0eb4a15fe3e620d22bcc6a81ffd21f0 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 not be sent until SendRequestHeaders() is called or
+ // 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_;
« 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