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

Issue 669157: Refactor WebSocket throttling feature. (Closed)

Created:
10 years, 9 months ago by ukai
Modified:
9 years, 7 months ago
CC:
chromium-reviews, jam, Paweł Hajdan Jr., darin-cc_chromium.org, jam+cc_chromium.org, brettw+cc_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Refactor WebSocket throttling feature. Protocol specific handling should be done in SocketStreamJob subclasss, so websocket throttling should be handled in WebSocketJob. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=41818

Patch Set 1 #

Total comments: 10

Patch Set 2 : Fix for tyoshino's comment #

Total comments: 2

Patch Set 3 : Fix to pass WebSocket unittests #

Patch Set 4 : fix socket_stream_dispatcher_host #

Patch Set 5 : Fix to pass unittests #

Patch Set 6 : fix for unittests #

Patch Set 7 : fix cast #

Total comments: 8

Patch Set 8 : Fix for tyoshino's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+305 lines, -418 lines) Patch
M chrome/browser/renderer_host/socket_stream_dispatcher_host.cc View 1 chunk +0 lines, -1 line 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M net/socket_stream/socket_stream.h View 1 2 3 4 5 6 7 4 chunks +6 lines, -3 lines 0 comments Download
M net/socket_stream/socket_stream.cc View 1 2 3 4 5 6 7 7 chunks +3 lines, -12 lines 0 comments Download
D net/socket_stream/socket_stream_throttle.h View 1 chunk +0 lines, -81 lines 0 comments Download
D net/socket_stream/socket_stream_throttle.cc View 1 chunk +0 lines, -80 lines 0 comments Download
M net/websockets/websocket_job.h View 1 2 3 4 6 chunks +14 lines, -2 lines 0 comments Download
M net/websockets/websocket_job.cc View 1 2 3 4 5 6 chunks +73 lines, -0 lines 0 comments Download
M net/websockets/websocket_job_unittest.cc View 3 4 6 7 2 chunks +17 lines, -2 lines 0 comments Download
M net/websockets/websocket_throttle.h View 1 2 3 4 2 chunks +21 lines, -27 lines 0 comments Download
M net/websockets/websocket_throttle.cc View 1 2 3 4 6 chunks +35 lines, -184 lines 0 comments Download
M net/websockets/websocket_throttle_unittest.cc View 1 2 3 4 5 6 7 2 chunks +136 lines, -24 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
ukai
10 years, 9 months ago (2010-03-05 12:29:51 UTC) #1
tyoshino (SeeGerritForStatus)
http://codereview.chromium.org/669157/diff/1/3 File net/socket_stream/socket_stream.cc (right): http://codereview.chromium.org/669157/diff/1/3#newcode231 net/socket_stream/socket_stream.cc:231: if (delegate) { Is there any case where detaching ...
10 years, 9 months ago (2010-03-10 06:49:14 UTC) #2
tyoshino (SeeGerritForStatus)
http://codereview.chromium.org/669157/diff/1/11 File net/websockets/websocket_throttle_unittest.cc (right): http://codereview.chromium.org/669157/diff/1/11#newcode71 net/websockets/websocket_throttle_unittest.cc:71: Could you add here some simple diagram to show ...
10 years, 9 months ago (2010-03-10 07:32:31 UTC) #3
ukai
http://codereview.chromium.org/669157/diff/1/3 File net/socket_stream/socket_stream.cc (right): http://codereview.chromium.org/669157/diff/1/3#newcode231 net/socket_stream/socket_stream.cc:231: if (delegate) { On 2010/03/10 06:49:14, tyoshino wrote: > ...
10 years, 9 months ago (2010-03-10 09:35:09 UTC) #4
tyoshino (SeeGerritForStatus)
LGTM http://codereview.chromium.org/669157/diff/8001/9006 File net/websockets/websocket_job.cc (right): http://codereview.chromium.org/669157/diff/8001/9006#newcode159 net/websockets/websocket_job.cc:159: Singleton<WebSocketThrottle>::get()->WakeupSocketIfNecessary(); Please add a test case for checking ...
10 years, 9 months ago (2010-03-12 05:54:12 UTC) #5
ukai
Thanks for review. Added test and fixed some other test issues. - we should return ...
10 years, 9 months ago (2010-03-12 07:16:18 UTC) #6
ukai
I changed lots to pass unittests. Could you take a look again, please? thanks
10 years, 9 months ago (2010-03-15 09:24:07 UTC) #7
tyoshino (SeeGerritForStatus)
LGTM http://codereview.chromium.org/669157/diff/31001/32009 File net/websockets/websocket_job_unittest.cc (right): http://codereview.chromium.org/669157/diff/31001/32009#newcode215 net/websockets/websocket_job_unittest.cc:215: addr.ai_family =- AF_INET; negative? http://codereview.chromium.org/669157/diff/31001/32009#newcode220 net/websockets/websocket_job_unittest.cc:220: addr.ai_addr = ...
10 years, 9 months ago (2010-03-17 05:57:58 UTC) #8
ukai
10 years, 9 months ago (2010-03-17 07:07:16 UTC) #9
http://codereview.chromium.org/669157/diff/31001/32009
File net/websockets/websocket_job_unittest.cc (right):

http://codereview.chromium.org/669157/diff/31001/32009#newcode215
net/websockets/websocket_job_unittest.cc:215: addr.ai_family =- AF_INET;
On 2010/03/17 05:57:58, tyoshino wrote:
> negative?

Oops. fixed

http://codereview.chromium.org/669157/diff/31001/32009#newcode220
net/websockets/websocket_job_unittest.cc:220: addr.ai_addr =
reinterpret_cast<sockaddr*>(&addr);
On 2010/03/17 05:57:58, tyoshino wrote:
> &sa_in ?

Oops. fixed

http://codereview.chromium.org/669157/diff/31001/32012
File net/websockets/websocket_throttle_unittest.cc (right):

http://codereview.chromium.org/669157/diff/31001/32012#newcode166
net/websockets/websocket_throttle_unittest.cc:166: // 1.2.3.6 | w1       w4  w5
On 2010/03/17 05:57:58, tyoshino wrote:
> one space between w4 and w5?

Done.

http://codereview.chromium.org/669157/diff/31001/32012#newcode184
net/websockets/websocket_throttle_unittest.cc:184: // 1.2.3.6 | w1       w4  w5
w6
On 2010/03/17 05:57:58, tyoshino wrote:
> ditto

Done.

Powered by Google App Engine
This is Rietveld 408576698