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

Issue 9251019: Fixes to socket_test_util.cc. (Closed)

Created:
8 years, 11 months ago by szym
Modified:
8 years, 11 months ago
Reviewers:
cbentzel, eroman, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, mmenke, willchan no longer on Chromium
Visibility:
Public.

Description

Fixes to socket_test_util.cc. - Removes ref-counting from DelayedSocketData and OrderedSocketData. - Calls CompleteRead (which reads from underlying data) only if a Socket::Read call is "blocked" (previously returned with ERR_IO_PENDING). - Removes unsafe pointers to the handed out sockets (the factory does not own them and cannot guarantee their lifetime). BUG=110626 TEST=./net_unittests --gtest_filter=Spdy*:Http*:Socket*:WebSocket*:Ftp* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=118634

Patch Set 1 #

Patch Set 2 : Removed unsafe pointers to sockets. #

Total comments: 7

Patch Set 3 : Renamed blocked_ -> read_in_progress_. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -219 lines) Patch
M net/dns/dns_transaction_unittest.cc View 1 6 chunks +8 lines, -11 lines 0 comments Download
M net/ftp/ftp_network_transaction.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M net/ftp/ftp_network_transaction_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_network_transaction_unittest.cc View 18 chunks +33 lines, -33 lines 0 comments Download
M net/socket/socket_test_util.h View 1 2 7 chunks +12 lines, -34 lines 0 comments Download
M net/socket/socket_test_util.cc View 1 2 10 chunks +13 lines, -21 lines 0 comments Download
M net/socket_stream/socket_stream_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M net/spdy/spdy_http_stream_unittest.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M net/spdy/spdy_network_transaction_unittest.cc View 67 chunks +103 lines, -99 lines 0 comments Download
M net/spdy/spdy_stream_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/spdy/spdy_websocket_stream_unittest.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M net/websockets/websocket_job_unittest.cc View 6 chunks +11 lines, -11 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
szym
8 years, 11 months ago (2012-01-18 20:53:36 UTC) #1
szym
On 2012/01/18 20:53:36, szym wrote: I'm planning to remove other unsafe methods from MockClientSocketFactory: GetMockTCPClientSocket ...
8 years, 11 months ago (2012-01-19 02:42:06 UTC) #2
cbentzel
It's been a while since I've worked with the mock sockets and socket_test_util's. Expect a ...
8 years, 11 months ago (2012-01-19 16:04:53 UTC) #3
cbentzel
wtc or eroman may also be good reviewers for this CL. I will still look.
8 years, 11 months ago (2012-01-19 16:43:23 UTC) #4
szym
On 2012/01/19 16:43:23, cbentzel wrote: > wtc or eroman may also be good reviewers for ...
8 years, 11 months ago (2012-01-19 17:06:03 UTC) #5
cbentzel
Actually, mmenke would be good given the work he's been doing with the network stack ...
8 years, 11 months ago (2012-01-20 16:34:33 UTC) #6
cbentzel
Were the RefCounted base classes just left over after a conversion to using WeakPtr's for ...
8 years, 11 months ago (2012-01-20 17:54:39 UTC) #7
szym
On 2012/01/20 17:54:39, cbentzel wrote: > Were the RefCounted base classes just left over after ...
8 years, 11 months ago (2012-01-20 18:07:18 UTC) #8
szym
On 2012/01/20 18:07:18, szym wrote: > On 2012/01/20 17:54:39, cbentzel wrote: > > Were the ...
8 years, 11 months ago (2012-01-20 18:57:24 UTC) #9
eroman
I quickly scanned through this change and LGTM. Was going to suggest you run through ...
8 years, 11 months ago (2012-01-21 01:18:30 UTC) #10
cbentzel
LGTM http://codereview.chromium.org/9251019/diff/8002/net/socket/socket_test_util.cc File net/socket/socket_test_util.cc (right): http://codereview.chromium.org/9251019/diff/8002/net/socket/socket_test_util.cc#newcode297 net/socket/socket_test_util.cc:297: 100); Do you still need this to be ...
8 years, 11 months ago (2012-01-21 02:03:51 UTC) #11
szym
Thank you both for reviewing this. http://codereview.chromium.org/9251019/diff/8002/net/dns/dns_transaction_unittest.cc File net/dns/dns_transaction_unittest.cc (left): http://codereview.chromium.org/9251019/diff/8002/net/dns/dns_transaction_unittest.cc#oldcode219 net/dns/dns_transaction_unittest.cc:219: EXPECT_EQ(3u, factory().udp_client_sockets().size()); On ...
8 years, 11 months ago (2012-01-21 06:59:16 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/szym@chromium.org/9251019/17002
8 years, 11 months ago (2012-01-22 01:57:19 UTC) #13
commit-bot: I haz the power
8 years, 11 months ago (2012-01-22 03:25:07 UTC) #14
Change committed as 118634

Powered by Google App Engine
This is Rietveld 408576698