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

Unified Diff: net/spdy/spdy_test_util.cc

Issue 9425016: Change MockRead and MockWrite (et. al.) to take an IoMode enum, instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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/spdy/spdy_test_util.h ('k') | net/spdy/spdy_websocket_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util.cc
===================================================================
--- net/spdy/spdy_test_util.cc (revision 123143)
+++ net/spdy/spdy_test_util.cc (working copy)
@@ -29,7 +29,7 @@
const char* ptr = data + (index * chunk_size);
if (index == num_chunks - 1)
chunk_size += length % chunk_size; // The last chunk takes the remainder.
- chunks[index] = MockWrite(true, ptr, chunk_size);
+ chunks[index] = MockWrite(ASYNC, ptr, chunk_size);
}
return chunks;
}
@@ -54,7 +54,7 @@
const char* ptr = data + (index * chunk_size);
if (index == num_chunks - 1)
chunk_size += length % chunk_size; // The last chunk takes the remainder.
- chunks[index] = MockRead(true, ptr, chunk_size);
+ chunks[index] = MockRead(ASYNC, ptr, chunk_size);
}
return chunks;
}
@@ -851,35 +851,35 @@
// Create a MockWrite from the given SpdyFrame.
MockWrite CreateMockWrite(const spdy::SpdyFrame& req) {
return MockWrite(
- true, req.data(), req.length() + spdy::SpdyFrame::kHeaderSize);
+ ASYNC, req.data(), req.length() + spdy::SpdyFrame::kHeaderSize);
}
// Create a MockWrite from the given SpdyFrame and sequence number.
MockWrite CreateMockWrite(const spdy::SpdyFrame& req, int seq) {
- return CreateMockWrite(req, seq, true);
+ return CreateMockWrite(req, seq, ASYNC);
}
// Create a MockWrite from the given SpdyFrame and sequence number.
-MockWrite CreateMockWrite(const spdy::SpdyFrame& req, int seq, bool async) {
+MockWrite CreateMockWrite(const spdy::SpdyFrame& req, int seq, IoMode mode) {
return MockWrite(
- async, req.data(), req.length() + spdy::SpdyFrame::kHeaderSize, seq);
+ mode, req.data(), req.length() + spdy::SpdyFrame::kHeaderSize, seq);
}
// Create a MockRead from the given SpdyFrame.
MockRead CreateMockRead(const spdy::SpdyFrame& resp) {
return MockRead(
- true, resp.data(), resp.length() + spdy::SpdyFrame::kHeaderSize);
+ ASYNC, resp.data(), resp.length() + spdy::SpdyFrame::kHeaderSize);
}
// Create a MockRead from the given SpdyFrame and sequence number.
MockRead CreateMockRead(const spdy::SpdyFrame& resp, int seq) {
- return CreateMockRead(resp, seq, true);
+ return CreateMockRead(resp, seq, ASYNC);
}
// Create a MockRead from the given SpdyFrame and sequence number.
-MockRead CreateMockRead(const spdy::SpdyFrame& resp, int seq, bool async) {
+MockRead CreateMockRead(const spdy::SpdyFrame& resp, int seq, IoMode mode) {
return MockRead(
- async, resp.data(), resp.length() + spdy::SpdyFrame::kHeaderSize, seq);
+ mode, resp.data(), resp.length() + spdy::SpdyFrame::kHeaderSize, seq);
}
// Combines the given SpdyFrames into the given char array and returns
« no previous file with comments | « net/spdy/spdy_test_util.h ('k') | net/spdy/spdy_websocket_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698