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

Unified Diff: net/quic/reliable_quic_stream.h

Issue 112343002: Merge ReliableQuicStream::WriteData with (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/quic/quic_reliable_client_stream.cc ('k') | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/reliable_quic_stream.h
diff --git a/net/quic/reliable_quic_stream.h b/net/quic/reliable_quic_stream.h
index f39b6603b5d65c130aa068f0c8c4042088620e34..ac6a7823267deb4331e1c5713bdd725b324f466f 100644
--- a/net/quic/reliable_quic_stream.h
+++ b/net/quic/reliable_quic_stream.h
@@ -137,15 +137,20 @@ class NET_EXPORT_PRIVATE ReliableQuicStream : public
bool headers_decompressed() const { return headers_decompressed_; }
protected:
- // Returns a pair with the number of bytes consumed from data, and a boolean
- // indicating if the fin bit was consumed. This does not indicate the data
- // has been sent on the wire: it may have been turned into a packet and queued
- // if the socket was unexpectedly blocked.
- //
- // The default implementation always consumed all bytes and any fin, but
- // this behavior is not guaranteed for subclasses so callers should check the
- // return value.
- virtual QuicConsumedData WriteData(base::StringPiece data, bool fin);
+ // Sends as much of 'data' to the connection as the connection will consume,
+ // and then buffers any remaining data in queued_data_.
+ void WriteOrBufferData(base::StringPiece data, bool fin);
+
+ // Sends as many bytes in the first |count| buffers of |iov| to the connection
+ // as the connection will consume.
+ // If |ack_notifier_delegate| is provided, then it will be notified once all
+ // the ACKs for this write have been received.
+ // Returns the number of bytes consumed by the connection.
+ QuicConsumedData WritevData(
+ const struct iovec* iov,
+ int iov_count,
+ bool fin,
+ QuicAckNotifier::DelegateInterface* ack_notifier_delegate);
// Close the read side of the socket. Further frames will not be accepted.
virtual void CloseReadSide();
@@ -166,27 +171,6 @@ class NET_EXPORT_PRIVATE ReliableQuicStream : public
// instead.
QuicPriority priority() const { return priority_; }
- // Sends as much of 'data' to the connection as the connection will consume,
- // and then buffers any remaining data in queued_data_.
- // Returns (data.size(), true) as it always consumed all data: it returns for
- // convenience to have the same return type as WriteDataInternal.
- QuicConsumedData WriteOrBuffer(base::StringPiece data, bool fin);
-
- // Sends as much of 'data' to the connection as the connection will consume.
- // Returns the number of bytes consumed by the connection.
- QuicConsumedData WriteDataInternal(base::StringPiece data, bool fin);
-
- // Sends as many bytes in the first |count| buffers of |iov| to the connection
- // as the connection will consume.
- // If |ack_notifier_delegate| is provided, then it will be notified once all
- // the ACKs for this write have been received.
- // Returns the number of bytes consumed by the connection.
- QuicConsumedData WritevDataInternal(
- const struct iovec* iov,
- int iov_count,
- bool fin,
- QuicAckNotifier::DelegateInterface* ack_notifier_delegate);
-
private:
friend class test::ReliableQuicStreamPeer;
friend class QuicStreamUtils;
« no previous file with comments | « net/quic/quic_reliable_client_stream.cc ('k') | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698