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

Unified Diff: blimp/net/test_common.h

Issue 1825263003: Blimp: add packet-level DEFLATE compression using zlib. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wez feedback Created 4 years, 9 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 | « blimp/net/stream_socket_connection.cc ('k') | blimp/net/test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/test_common.h
diff --git a/blimp/net/test_common.h b/blimp/net/test_common.h
index e86944b49b45c00427f2f0b7ee9f5db2f86e3d9e..479f2dcaef6ee23248b21aee61013b6f761b7653 100644
--- a/blimp/net/test_common.h
+++ b/blimp/net/test_common.h
@@ -70,9 +70,10 @@ ACTION_TEMPLATE(FillBufferFromString,
memcpy(testing::get<buf_idx>(args)->data(), str.data(), str.size());
}
-// Returns true if |buf| has a prefix of |str|.
-// Behavior is undefined if len(buf) < len(str).
-bool BufferStartsWith(net::GrowableIOBuffer* buf, const std::string& str);
+// Returns true if |buf| is prefixed by |str|.
+bool BufferStartsWith(net::GrowableIOBuffer* buf,
+ size_t buf_size,
+ const std::string& str);
// GMock action that writes data from a BlimpMessage to a GrowableIOBuffer.
// Advances the buffer's |offset| to the end of the message.
« no previous file with comments | « blimp/net/stream_socket_connection.cc ('k') | blimp/net/test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698