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

Unified Diff: net/spdy/spdy_read_queue.h

Issue 2388243003: Add test for SpdyReadQueue::Clear(). (Closed)
Patch Set: 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 | « no previous file | net/spdy/spdy_read_queue.cc » ('j') | net/spdy/spdy_read_queue_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_read_queue.h
diff --git a/net/spdy/spdy_read_queue.h b/net/spdy/spdy_read_queue.h
index af2ff87dcdd834ba435b1374fed667130a367c44..87fc0ab4475633923afaa0b0826341ccaa30a6e3 100644
--- a/net/spdy/spdy_read_queue.h
+++ b/net/spdy/spdy_read_queue.h
@@ -40,6 +40,8 @@ class NET_EXPORT_PRIVATE SpdyReadQueue {
void Clear();
private:
+ // Class invariant:
+ // |total_size_| is the sum of GetRemainingSize() of |queue_|'s elements.
std::deque<std::unique_ptr<SpdyBuffer>> queue_;
size_t total_size_;
« no previous file with comments | « no previous file | net/spdy/spdy_read_queue.cc » ('j') | net/spdy/spdy_read_queue_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698