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

Unified Diff: net/socket/socket_test_util.cc

Issue 1114383003: Add AllReadDataConsumed and AllWriteDataConsumed methods to SocketDataProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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/socket/socket_test_util.h ('k') | remoting/base/buffered_socket_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_test_util.cc
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index c5861faa796cdb373be504169b7ab5bbe548e1fd..92bd1c90ecae3e7c540c3b3c49f7653c4252e19a 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -248,6 +248,14 @@ void StaticSocketDataProvider::Reset() {
helper_.Reset();
}
+bool StaticSocketDataProvider::AllReadDataConsumed() const {
+ return helper_.at_read_eof();
+}
+
+bool StaticSocketDataProvider::AllWriteDataConsumed() const {
+ return helper_.at_write_eof();
+}
+
DynamicSocketDataProvider::DynamicSocketDataProvider()
: short_read_limit_(0),
allow_unconsumed_reads_(false) {
@@ -600,6 +608,14 @@ void SequencedSocketData::Reset() {
weak_factory_.InvalidateWeakPtrs();
}
+bool SequencedSocketData::AllReadDataConsumed() const {
+ return helper_.at_read_eof();
+}
+
+bool SequencedSocketData::AllWriteDataConsumed() const {
+ return helper_.at_write_eof();
+}
+
bool SequencedSocketData::at_read_eof() const {
return helper_.at_read_eof();
}
« no previous file with comments | « net/socket/socket_test_util.h ('k') | remoting/base/buffered_socket_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698