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

Issue 384024: There was confusion in the mock socket classes due to... (Closed)

Created:
11 years, 1 month ago by Mike Belshe
Modified:
9 years, 5 months ago
Reviewers:
eroman
CC:
chromium-reviews_googlegroups.com, darin (slow to review), Paweł Hajdan Jr.
Visibility:
Public.

Description

There was confusion in the mock socket classes due to overlapping names. The MockSocket is not actually a socket. It is an interface for fetching data for reads and writes on a socket. The MockClientSocket and MockTCPClientSocket are the actual sockets. Rename MockSocket to SocketDataProvider. Rename SSLMockSocket to SSLSocketDataProvider. Update all tests to reflect name change. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31640

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 18

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+430 lines, -426 lines) Patch
M net/flip/flip_network_transaction_unittest.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M net/ftp/ftp_network_transaction_unittest.cc View 1 2 3 4 32 chunks +190 lines, -190 lines 0 comments Download
M net/http/http_network_layer_unittest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 52 chunks +153 lines, -153 lines 0 comments Download
M net/socket/socket_test_util.h View 1 2 3 4 11 chunks +46 lines, -44 lines 0 comments Download
M net/socket/socket_test_util.cc View 1 2 3 4 7 chunks +21 lines, -19 lines 0 comments Download
M net/socket/socks5_client_socket_unittest.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M net/socket/socks_client_socket_unittest.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
MM net/socket_stream/socket_stream_unittest.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
MM net/websockets/websocket_unittest.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Mike Belshe
This massive code review is ONLY about renaming. Note - in the individual test cases, ...
11 years, 1 month ago (2009-11-11 00:11:27 UTC) #1
Mike Belshe
Reviewers: eroman, Message: This massive code review is ONLY about renaming. Note - in the ...
11 years, 1 month ago (2009-11-11 00:11:45 UTC) #2
eroman
lgtm, much better! http://codereview.chromium.org/384024/diff/1039/22 File net/ftp/ftp_network_transaction_unittest.cc (right): http://codereview.chromium.org/384024/diff/1039/22#newcode36 Line 36: class FtpMockControlSocket : public DynamicSocketDataProvider ...
11 years, 1 month ago (2009-11-11 01:14:41 UTC) #3
eroman
lgtm, much better! http://codereview.chromium.org/384024/diff/1039/22 File net/ftp/ftp_network_transaction_unittest.cc (right): http://codereview.chromium.org/384024/diff/1039/22#newcode36 Line 36: class FtpMockControlSocket : public DynamicSocketDataProvider ...
11 years, 1 month ago (2009-11-11 01:15:02 UTC) #4
Mike Belshe
http://codereview.chromium.org/384024/diff/1039/22 File net/ftp/ftp_network_transaction_unittest.cc (right): http://codereview.chromium.org/384024/diff/1039/22#newcode36 Line 36: class FtpMockControlSocket : public DynamicSocketDataProvider { On 2009/11/11 ...
11 years, 1 month ago (2009-11-11 01:40:10 UTC) #5
Mike Belshe
11 years, 1 month ago (2009-11-11 01:40:42 UTC) #6
http://codereview.chromium.org/384024/diff/1039/22
File net/ftp/ftp_network_transaction_unittest.cc (right):

http://codereview.chromium.org/384024/diff/1039/22#newcode36
Line 36: class FtpMockControlSocket : public DynamicSocketDataProvider {
On 2009/11/11 01:14:41, eroman wrote:
> [optional] may want to rename this class too?

Done.

http://codereview.chromium.org/384024/diff/1039/22#newcode550
Line 550: StaticSocketDataProvider data_socket1(data_reads, NULL);
On 2009/11/11 01:14:41, eroman wrote:
> [optional] might want to rename all of the "data_socketX" to something
else.

Done.

http://codereview.chromium.org/384024/diff/1039/19
File net/socket/socket_test_util.cc (right):

http://codereview.chromium.org/384024/diff/1039/19#newcode65
Line 65: net::SocketDataProvider* socket)
On 2009/11/11 01:14:41, eroman wrote:
> could you rename |socket| --> |data|, or |data_provider| ?

Done.

http://codereview.chromium.org/384024/diff/1039/19#newcode166
Line 166: net::SSLSocketDataProvider* socket)
On 2009/11/11 01:14:41, eroman wrote:
> ditto.

Done.

http://codereview.chromium.org/384024/diff/1039/19#newcode275
Line 275: SocketDataProvider* socket) {
On 2009/11/11 01:14:41, eroman wrote:
> ditto

Done.

http://codereview.chromium.org/384024/diff/1039/19#newcode280
Line 280: SSLSocketDataProvider* socket) {
On 2009/11/11 01:14:41, eroman wrote:
> ditto

Done.

http://codereview.chromium.org/384024/diff/1039/20
File net/socket/socket_test_util.h (right):

http://codereview.chromium.org/384024/diff/1039/20#newcode77
Line 77: // The SocketDataProvider is an interface used by the
MockSocket
On 2009/11/11 01:14:41, eroman wrote:
> Should MockSocket instead read MockClientSocket here? (so it
corresponds with a
> class name).

Done.

http://codereview.chromium.org/384024/diff/1039/18
File net/socket/socks5_client_socket_unittest.cc (right):

http://codereview.chromium.org/384024/diff/1039/18#newcode48
Line 48: scoped_ptr<SocketDataProvider> mock_socket_;
On 2009/11/11 01:14:41, eroman wrote:
> ditto

Done.

http://codereview.chromium.org/384024/diff/1039/21
File net/socket/socks_client_socket_unittest.cc (right):

http://codereview.chromium.org/384024/diff/1039/21#newcode42
Line 42: scoped_ptr<SocketDataProvider> mock_socket_;
On 2009/11/11 01:14:41, eroman wrote:
> ditto

Done.

http://codereview.chromium.org/384024

Powered by Google App Engine
This is Rietveld 408576698