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

Unified Diff: net/socket/socket_test_util.h

Issue 2411033003: Drop buffers in idle SSLClientSockets (and SSLServerSockets). (Closed)
Patch Set: rsleevi comments Created 4 years, 2 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_bio_adapter_unittest.cc ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_test_util.h
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index 4cc20d6296f392c2c2ea771c000c658c7c83ede3..b0bbd896bf02032945a421a1c1077c3107a4d969 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -280,12 +280,12 @@ class StaticSocketDataHelper {
size_t writes_count);
~StaticSocketDataHelper();
- // These functions get access to the next available read and write data,
- // or null if there is no more data available.
+ // These functions get access to the next available read and write data. They
+ // CHECK fail if there is no data available.
const MockRead& PeekRead() const;
const MockWrite& PeekWrite() const;
- // Returns the current read or write , and then advances to the next one.
+ // Returns the current read or write, and then advances to the next one.
const MockRead& AdvanceRead();
const MockWrite& AdvanceWrite();
@@ -306,6 +306,10 @@ class StaticSocketDataHelper {
bool AllWriteDataConsumed() const { return write_index_ >= write_count_; }
private:
+ // Returns the next available read or write that is not a pause event. CHECK
+ // fails if no data is available.
+ const MockWrite& PeekRealWrite() const;
+
MockRead* reads_;
size_t read_index_;
size_t read_count_;
@@ -432,7 +436,7 @@ class SequencedSocketData : public SocketDataProvider {
IDLE, // No async operation is in progress.
PENDING, // An async operation in waiting for another opteration to
// complete.
- COMPLETING, // A task has been posted to complet an async operation.
+ COMPLETING, // A task has been posted to complete an async operation.
PAUSED, // IO is paused until Resume() is called.
};
« no previous file with comments | « net/socket/socket_bio_adapter_unittest.cc ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698