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

Unified Diff: jingle/glue/fake_ssl_client_socket_unittest.cc

Issue 10796085: Give MockRead and MockWrite distinct types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix compile. Created 8 years, 5 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/http/http_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/glue/fake_ssl_client_socket_unittest.cc
diff --git a/jingle/glue/fake_ssl_client_socket_unittest.cc b/jingle/glue/fake_ssl_client_socket_unittest.cc
index a7ae4faf8b81b9bfc69520a95f83ae1ac5c3b5f9..97cb3bb4bad408054be85f79938952a56a8890bf 100644
--- a/jingle/glue/fake_ssl_client_socket_unittest.cc
+++ b/jingle/glue/fake_ssl_client_socket_unittest.cc
@@ -72,16 +72,15 @@ class MockClientSocket : public net::StreamSocket {
// Break up |data| into a bunch of chunked MockReads/Writes and push
// them onto |ops|.
+template <net::MockReadWriteType type>
void AddChunkedOps(base::StringPiece data, size_t chunk_size, net::IoMode mode,
- std::vector<net::MockRead>* ops) {
+ std::vector<net::MockReadWrite<type> >* ops) {
DCHECK_GT(chunk_size, 0U);
size_t offset = 0;
while (offset < data.size()) {
size_t bounded_chunk_size = std::min(data.size() - offset, chunk_size);
- // We take advantage of the fact that MockWrite is typedefed to
- // MockRead.
- ops->push_back(net::MockRead(mode, data.data() + offset,
- bounded_chunk_size));
+ ops->push_back(net::MockReadWrite<type>(mode, data.data() + offset,
+ bounded_chunk_size));
offset += bounded_chunk_size;
}
}
« no previous file with comments | « no previous file | net/http/http_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698