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

Issue 2930263002: Add blink::WebSocketHandshakeThrottle (Closed)

Created:
3 years, 6 months ago by Adam Rice
Modified:
3 years, 6 months ago
Reviewers:
haraken, brettw, yhirano
CC:
chromium-reviews, tyoshino+watch_chromium.org, yhirano+watch_chromium.org, blink-reviews, dglazkov+blink, haraken, kinuko+watch, blink-reviews-api_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add blink::WebSocketHandshakeThrottle Add a facility for WebSocket handshakes to be delayed or cancelled by the embedder. By implementing blink::Platform::CreateWebSocketHandshakeThrottle() the embedder can supply an implementation of blink::WebSocketHandshakeThrottle to throttle WebSocket handshakes. To avoid slowing down the normal case, the throttling runs in parallel with the handshake. Only access to the new connection from Javascript is delayed. The default behaviour is to have no throttling. The implementation is in blink::DocumentWebSocketChannel. DocumentWebSocketChannelTest has new tests for the new functionality. This is part of the implementation of Safe Browsing for WebSockets. See the design doc at https://docs.google.com/document/d/1iR3XMIQukqlXb6ajIHE91apHZAxyF_wvRoB5JGeJYPs/edit BUG=644744 Review-Url: https://codereview.chromium.org/2930263002 Cr-Commit-Position: refs/heads/master@{#479709} Committed: https://chromium.googlesource.com/chromium/src/+/bf9d1c2f8e5ea0366b4b086c7d0541bdc15ab176

Patch Set 1 #

Patch Set 2 : Remove surplus include #

Total comments: 12

Patch Set 3 : Fixes from yhirano review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+434 lines, -24 lines) Patch
M third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h View 1 2 6 chunks +31 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp View 1 2 12 chunks +88 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp View 8 chunks +253 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/Platform.cpp View 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/Platform.h View 3 chunks +10 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/WebSocketHandshakeThrottle.h View 1 chunk +46 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (6 generated)
Adam Rice
3 years, 6 months ago (2017-06-12 07:12:08 UTC) #2
yhirano
https://codereview.chromium.org/2930263002/diff/20001/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp File third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp (right): https://codereview.chromium.org/2930263002/diff/20001/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp#newcode146 third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp:146: String selected_protocol; const https://codereview.chromium.org/2930263002/diff/20001/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp#newcode147 third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp:147: String extensions; ditto https://codereview.chromium.org/2930263002/diff/20001/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp#newcode737 ...
3 years, 6 months ago (2017-06-13 09:14:39 UTC) #3
Adam Rice
https://codereview.chromium.org/2930263002/diff/20001/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp File third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp (right): https://codereview.chromium.org/2930263002/diff/20001/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp#newcode146 third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp:146: String selected_protocol; On 2017/06/13 09:14:39, yhirano wrote: > const ...
3 years, 6 months ago (2017-06-13 12:53:42 UTC) #4
yhirano
lgtm
3 years, 6 months ago (2017-06-14 11:55:39 UTC) #5
Adam Rice
+haraken for blink platform.
3 years, 6 months ago (2017-06-15 09:36:48 UTC) #7
haraken
platform/ LGTM (I'm assuming that you'll add actual implementation of WebSocketHandshakeThrottle to the content/ side ...
3 years, 6 months ago (2017-06-15 12:41:46 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2930263002/40001
3 years, 6 months ago (2017-06-15 13:06:04 UTC) #10
Adam Rice
Thanks for the review. On 2017/06/15 12:41:46, haraken wrote: > (I'm assuming that you'll add ...
3 years, 6 months ago (2017-06-15 13:06:20 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/bf9d1c2f8e5ea0366b4b086c7d0541bdc15ab176
3 years, 6 months ago (2017-06-15 15:20:09 UTC) #14
brettw
I am getting failures on the waterfall as a result of this patch because the ...
3 years, 6 months ago (2017-06-15 17:19:18 UTC) #16
brettw
This bot seems to be failing every time and is way backlogged now because it ...
3 years, 6 months ago (2017-06-15 17:43:24 UTC) #17
brettw
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2939123002/ by brettw@chromium.org. ...
3 years, 6 months ago (2017-06-15 17:43:48 UTC) #18
brettw
The CQ missing this problem is being tracked here: https://bugs.chromium.org/p/chromium/issues/detail?id=733500
3 years, 6 months ago (2017-06-15 18:21:36 UTC) #19
Adam Rice
3 years, 6 months ago (2017-06-16 05:54:41 UTC) #20
Message was sent while issue was closed.
Sorry for the trouble. The problem is obvious in hindsight.

I am relanding with the addition of the new file to BUILD.gn in
https://codereview.chromium.org/2942173002.

Powered by Google App Engine
This is Rietveld 408576698