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

Unified Diff: net/spdy/bidirectional_stream_spdy_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 side-by-side diff with in-line comments
Download patch
Index: net/spdy/bidirectional_stream_spdy_impl.h
diff --git a/net/spdy/bidirectional_stream_spdy_impl.h b/net/spdy/bidirectional_stream_spdy_impl.h
index 62e7bb66f00db8ca7d15a74af1629004ce661065..d1a631bd93ff532cfc725cafb0b41b28c04e9612 100644
--- a/net/spdy/bidirectional_stream_spdy_impl.h
+++ b/net/spdy/bidirectional_stream_spdy_impl.h
@@ -39,10 +39,14 @@ class NET_EXPORT_PRIVATE BidirectionalStreamSpdyImpl
// BidirectionalStreamImpl implementation:
void Start(const BidirectionalStreamRequestInfo* request_info,
const BoundNetLog& net_log,
+ bool disable_auto_flush,
BidirectionalStreamImpl::Delegate* delegate,
scoped_ptr<base::Timer> timer) override;
int ReadData(IOBuffer* buf, int buf_len) override;
void SendData(IOBuffer* data, int length, bool end_stream) override;
+ void SendvData(const std::vector<IOBuffer*>& buffers,
+ const std::vector<int>& lengths,
+ bool end_stream) override;
void Cancel() override;
NextProto GetProtocol() const override;
int64_t GetTotalReceivedBytes() const override;
@@ -91,6 +95,11 @@ class NET_EXPORT_PRIVATE BidirectionalStreamSpdyImpl
// After |stream_| has been closed, this keeps track of the total number of
// bytes sent over the network for |stream_| while it was open.
int64_t closed_stream_sent_bytes_;
+ // Whether auto flush is disabled.
+ bool disable_auto_flush_;
+ // Only relevant when |disable_auto_flush_| is true;
+ // This is the combined buffer of buffers passed in through SendvData.
+ scoped_refptr<IOBuffer> pending_combined_buffer_;
base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698