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

Issue 342052: Implement websocket throttling. (Closed)

Created:
11 years, 1 month ago by ukai
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Implement websocket throttling. Implement the client-side requirements in the spec. 4.1 Handshake 1. If the user agent already has a Web Socket connection to the remote host (IP address) identified by /host/, even if known by another name, wait until that connection has been established or for that connection to have failed. BUG=none TEST=net_unittests passes Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30949

Patch Set 1 #

Patch Set 2 : include build/build_config.h #

Total comments: 26

Patch Set 3 : Fix for review comments #

Total comments: 14

Patch Set 4 : Fix yuzo's comment #

Total comments: 2

Patch Set 5 : Fix tyoshino's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+743 lines, -25 lines) Patch
M chrome/browser/renderer_host/socket_stream_dispatcher_host.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 chunks +5 lines, -0 lines 0 comments Download
M net/socket_stream/socket_stream.h View 1 2 4 chunks +12 lines, -2 lines 0 comments Download
M net/socket_stream/socket_stream.cc View 1 2 3 4 10 chunks +37 lines, -23 lines 0 comments Download
A net/socket_stream/socket_stream_throttle.h View 1 chunk +81 lines, -0 lines 0 comments Download
A net/socket_stream/socket_stream_throttle.cc View 1 chunk +80 lines, -0 lines 0 comments Download
A net/websockets/websocket_throttle.h View 3 4 1 chunk +67 lines, -0 lines 0 comments Download
A net/websockets/websocket_throttle.cc View 3 4 1 chunk +293 lines, -0 lines 0 comments Download
A net/websockets/websocket_throttle_unittest.cc View 1 chunk +166 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
ukai
11 years, 1 month ago (2009-10-30 08:03:59 UTC) #1
tyoshino (SeeGerritForStatus)
http://codereview.chromium.org/342052/diff/3001/4002 File net/net.gyp (right): http://codereview.chromium.org/342052/diff/3001/4002#newcode653 Line 653: 'websockets/websocket_throttler_unittest.cc', sort lexicographically? http://codereview.chromium.org/342052/diff/3001/4003 File net/socket_stream/socket_stream.cc (right): http://codereview.chromium.org/342052/diff/3001/4003#newcode683 ...
11 years, 1 month ago (2009-11-02 08:44:23 UTC) #2
Yuzo
s/throtting/throttling/ in the issue description. I don't see any thread synchronization in this patch. Is ...
11 years, 1 month ago (2009-11-02 09:50:25 UTC) #3
ukai
http://codereview.chromium.org/342052/diff/3001/4001 File chrome/browser/renderer_host/socket_stream_dispatcher_host.cc (right): http://codereview.chromium.org/342052/diff/3001/4001#newcode12 Line 12: #include "net/websockets/websocket_throttler.h" On 2009/11/02 09:50:26, Yuzo wrote: > ...
11 years, 1 month ago (2009-11-04 05:45:09 UTC) #4
Yuzo
http://codereview.chromium.org/342052/diff/5001/6003 File net/socket_stream/socket_stream.cc (right): http://codereview.chromium.org/342052/diff/5001/6003#newcode256 Line 256: &io_callback_); Extra space before &io_... http://codereview.chromium.org/342052/diff/5001/6007 File net/websockets/websocket_throttle.cc ...
11 years, 1 month ago (2009-11-04 06:22:26 UTC) #5
ukai
http://codereview.chromium.org/342052/diff/5001/6003 File net/socket_stream/socket_stream.cc (right): http://codereview.chromium.org/342052/diff/5001/6003#newcode256 Line 256: &io_callback_); On 2009/11/04 06:22:26, Yuzo wrote: > Extra ...
11 years, 1 month ago (2009-11-04 06:29:45 UTC) #6
tyoshino (SeeGerritForStatus)
LGTM http://codereview.chromium.org/342052/diff/5001/6003 File net/socket_stream/socket_stream.cc (right): http://codereview.chromium.org/342052/diff/5001/6003#newcode244 Line 244: if (!delegate_) nit: how about do either ...
11 years, 1 month ago (2009-11-04 07:07:41 UTC) #7
ukai
http://codereview.chromium.org/342052/diff/5001/6003 File net/socket_stream/socket_stream.cc (right): http://codereview.chromium.org/342052/diff/5001/6003#newcode244 Line 244: if (!delegate_) On 2009/11/04 07:07:41, tyoshino wrote: > ...
11 years, 1 month ago (2009-11-04 07:49:59 UTC) #8
tyoshino (SeeGerritForStatus)
LGTM
11 years, 1 month ago (2009-11-04 08:11:08 UTC) #9
Yuzo
LGTM except the following. http://codereview.chromium.org/342052/diff/8002/9002 File chrome/browser/renderer_host/socket_stream_dispatcher_host.cc (right): http://codereview.chromium.org/342052/diff/8002/9002#newcode16 Line 16: net::WebSocketThrottle::Init(); Why do we ...
11 years, 1 month ago (2009-11-04 08:20:12 UTC) #10
ukai
11 years, 1 month ago (2009-11-04 08:29:20 UTC) #11
http://codereview.chromium.org/342052/diff/8002/9002
File chrome/browser/renderer_host/socket_stream_dispatcher_host.cc (right):

http://codereview.chromium.org/342052/diff/8002/9002#newcode16
Line 16: net::WebSocketThrottle::Init();
On 2009/11/04 08:20:12, Yuzo wrote:
> Why do we need this?
> Do we have any reasons to require the existence of the singleton at this
moment?

We need to call Init to construct the singleton somewhere (it's not
automatically constructed), and I think it's good place to do it.  It should be
before the first SocketStream constructed (and I don't want to make SocketStream
depends on WebSocket.)

Powered by Google App Engine
This is Rietveld 408576698