Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Issue 10796085: Give MockRead and MockWrite distinct types. (Closed)

Created:
8 years, 5 months ago by Yuta Kitamura
Modified:
8 years, 4 months ago
Reviewers:
akalin, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Give MockRead and MockWrite distinct types. Currently, MockRead and MockWrite are defined as the same type by using typedef. However, these types are different types and should not be used interchangably. This change gives MockRead and MockWrite distinct types by using templates so the compiler can cause an error when these types are used interchangably. Some misuses of MockRead and MockWrite were found, so these are fixed in this change, too. BUG=none [email protected],[email protected] Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=148782

Patch Set 1 #

Patch Set 2 : Fix jingle tests. #

Total comments: 2

Patch Set 3 : Rebase. #

Patch Set 4 : Rebase and fix compile. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -62 lines) Patch
M jingle/glue/fake_ssl_client_socket_unittest.cc View 1 2 1 chunk +4 lines, -5 lines 0 comments Download
M net/http/http_network_transaction_spdy2_unittest.cc View 1 2 3 4 chunks +7 lines, -7 lines 0 comments Download
M net/http/http_network_transaction_spdy3_unittest.cc View 1 2 3 4 chunks +7 lines, -7 lines 0 comments Download
M net/http/http_proxy_client_socket_pool_spdy2_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_proxy_client_socket_pool_spdy3_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/socket/socket_test_util.h View 3 chunks +37 lines, -23 lines 0 comments Download
M net/socket/socket_test_util.cc View 5 chunks +8 lines, -7 lines 0 comments Download
M net/socket/socks_client_socket_pool_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/spdy/spdy_network_transaction_spdy2_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/spdy/spdy_network_transaction_spdy3_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/spdy/spdy_session_spdy2_unittest.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M net/spdy/spdy_session_spdy3_unittest.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Yuta Kitamura
8 years, 5 months ago (2012-07-23 11:35:49 UTC) #1
mmenke
Seems like a good idea to me. LGTM. http://codereview.chromium.org/10796085/diff/3002/net/socket/socket_test_util.h File net/socket/socket_test_util.h (right): http://codereview.chromium.org/10796085/diff/3002/net/socket/socket_test_util.h#newcode85 net/socket/socket_test_util.h:85: // ...
8 years, 5 months ago (2012-07-23 15:44:25 UTC) #2
Yuta Kitamura
Thanks. akalin: Could you look at the changes under jingle? https://chromiumcodereview.appspot.com/10796085/diff/3002/net/socket/socket_test_util.h File net/socket/socket_test_util.h (right): https://chromiumcodereview.appspot.com/10796085/diff/3002/net/socket/socket_test_util.h#newcode85 ...
8 years, 5 months ago (2012-07-24 01:21:30 UTC) #3
mmenke
On 2012/07/24 01:21:30, Yuta Kitamura wrote: > Thanks. > > akalin: Could you look at ...
8 years, 5 months ago (2012-07-24 01:22:43 UTC) #4
akalin
jingle lgtm
8 years, 5 months ago (2012-07-24 04:42:32 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10796085/3002
8 years, 5 months ago (2012-07-26 09:50:25 UTC) #6
commit-bot: I haz the power
Failed to apply patch for jingle/notifier/base/fake_ssl_client_socket_unittest.cc: While running patch -p1 --forward --force; patching file jingle/notifier/base/fake_ssl_client_socket_unittest.cc ...
8 years, 5 months ago (2012-07-26 09:50:29 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10796085/13001
8 years, 5 months ago (2012-07-26 10:08:39 UTC) #8
commit-bot: I haz the power
Try job failure for 10796085-13001 (retry) on linux_clang for step "compile" (clobber build). It's a ...
8 years, 5 months ago (2012-07-26 10:31:15 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10796085/13001
8 years, 5 months ago (2012-07-27 03:49:26 UTC) #10
commit-bot: I haz the power
Try job failure for 10796085-13001 (retry) on mac_rel for step "compile" (clobber build). It's a ...
8 years, 5 months ago (2012-07-27 04:02:31 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10796085/22002
8 years, 5 months ago (2012-07-27 04:17:16 UTC) #12
commit-bot: I haz the power
Try job failure for 10796085-22002 (retry) on linux_rel for step "browser_tests". It's a second try, ...
8 years, 5 months ago (2012-07-27 09:11:40 UTC) #13
Yuta Kitamura
On 2012/07/27 09:11:40, I haz the power (commit-bot) wrote: > Try job failure for 10796085-22002 ...
8 years, 4 months ago (2012-07-27 13:34:08 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10796085/22002
8 years, 4 months ago (2012-07-27 13:34:26 UTC) #15
commit-bot: I haz the power
8 years, 4 months ago (2012-07-27 19:02:05 UTC) #16
Change committed as 148782

Powered by Google App Engine
This is Rietveld 408576698