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

Issue 2003253002: [Devtools] Allow User-Agent header override for Websockets (Closed)

Created:
4 years, 7 months ago by allada
Modified:
4 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, jam, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, darin-cc_chromium.org, devtools-reviews_chromium.org, blink-reviews, apavlov+blink_chromium.org, sergeyv+blink_chromium.org, pfeldman, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Devtools] Allow User-Agent header override for Websockets This Should make it so a user can override Websockets through devtools protocol. BUG=446909 Committed: https://crrev.com/8031445e44e495dfdcc8011f05323a9e479596c7 Committed: https://crrev.com/cef397d06a9527ee4a3895572d448ba1e9377ca0 Cr-Original-Commit-Position: refs/heads/master@{#402627} Cr-Commit-Position: refs/heads/master@{#402862}

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : #

Total comments: 6

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Total comments: 3

Patch Set 7 : tests #

Total comments: 4

Patch Set 8 : tests #

Patch Set 9 : tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -119 lines) Patch
M content/browser/bad_message.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/websocket_dispatcher_host_unittest.cc View 1 2 3 4 6 chunks +7 lines, -5 lines 0 comments Download
M content/browser/renderer_host/websocket_host.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/websocket_host.cc View 1 2 3 4 5 6 3 chunks +24 lines, -5 lines 0 comments Download
M content/child/websocket_bridge.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/child/websocket_bridge.cc View 1 2 3 4 5 6 2 chunks +4 lines, -1 line 0 comments Download
M content/common/websocket_messages.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M net/websockets/websocket_channel.h View 4 chunks +5 lines, -1 line 0 comments Download
M net/websockets/websocket_channel.cc View 1 4 chunks +9 lines, -8 lines 0 comments Download
M net/websockets/websocket_channel_test.cc View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M net/websockets/websocket_end_to_end_test.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M net/websockets/websocket_handshake_stream_create_helper_test.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/websockets/websocket_stream.h View 2 chunks +2 lines, -0 lines 0 comments Download
M net/websockets/websocket_stream.cc View 5 chunks +10 lines, -4 lines 0 comments Download
M net/websockets/websocket_stream_cookie_test.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M net/websockets/websocket_stream_create_test_base.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M net/websockets/websocket_stream_create_test_base.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M net/websockets/websocket_stream_test.cc View 1 2 3 4 5 6 7 8 51 chunks +88 lines, -52 lines 0 comments Download
M net/websockets/websocket_test_util.h View 1 2 3 4 5 2 chunks +7 lines, -4 lines 0 comments Download
M net/websockets/websocket_test_util.cc View 1 2 3 4 5 2 chunks +32 lines, -23 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html View 1 2 3 4 5 6 7 1 chunk +52 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override-expected.txt View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp View 1 2 3 4 5 6 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/public/platform/modules/websockets/WebSocketHandle.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 110 (52 generated)
allada
PTL (just checking to see if this is a good way for now)
4 years, 7 months ago (2016-05-24 01:10:41 UTC) #2
dgozman
https://codereview.chromium.org/2003253002/diff/1/content/browser/renderer_host/websocket_host.cc File content/browser/renderer_host/websocket_host.cc (right): https://codereview.chromium.org/2003253002/diff/1/content/browser/renderer_host/websocket_host.cc#newcode444 content/browser/renderer_host/websocket_host.cc:444: std::string user_agent = agent->GetUserAgentOverride(); I'd reverse this dependency, reaching ...
4 years, 7 months ago (2016-05-24 19:02:31 UTC) #3
allada
PTL
4 years, 7 months ago (2016-05-26 21:22:08 UTC) #8
dgozman
This looks good from devtools side. We need a test though. Let's ask for review ...
4 years, 7 months ago (2016-05-26 23:13:11 UTC) #9
allada
PTL
4 years, 6 months ago (2016-05-27 21:29:34 UTC) #12
yhirano
Can you add a unit test in websocket_stream_test.cc for non-empty additional headers? https://codereview.chromium.org/2003253002/diff/120001/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h File third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h ...
4 years, 6 months ago (2016-05-30 11:12:57 UTC) #13
allada
I made the requested changes PTL. https://codereview.chromium.org/2003253002/diff/120001/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h File third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h (right): https://codereview.chromium.org/2003253002/diff/120001/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h#newcode134 third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h:134: const WebString additionalHeaders(); ...
4 years, 6 months ago (2016-06-01 19:06:41 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003253002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2003253002/200001
4 years, 6 months ago (2016-06-01 19:13:04 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/169410)
4 years, 6 months ago (2016-06-01 19:28:58 UTC) #21
dgozman
devtools lgtm https://codereview.chromium.org/2003253002/diff/200001/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html File third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html (right): https://codereview.chromium.org/2003253002/diff/200001/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html#newcode12 third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html:12: testRunner.dumpAsText(); Harness does this for you. Remove.
4 years, 6 months ago (2016-06-01 19:48:54 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003253002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2003253002/240001
4 years, 6 months ago (2016-06-01 20:34:59 UTC) #25
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/231750)
4 years, 6 months ago (2016-06-02 03:16:38 UTC) #27
yhirano
https://codereview.chromium.org/2003253002/diff/240001/net/websockets/websocket_stream_test.cc File net/websockets/websocket_stream_test.cc (right): https://codereview.chromium.org/2003253002/diff/240001/net/websockets/websocket_stream_test.cc#newcode384 net/websockets/websocket_stream_test.cc:384: TEST_F(WebSocketStreamCreateTest, HandshakeOverrideHeaders) { Can you add "additional_headers" parameter to ...
4 years, 6 months ago (2016-06-02 06:29:13 UTC) #28
allada
PTL https://codereview.chromium.org/2003253002/diff/200001/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html File third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html (right): https://codereview.chromium.org/2003253002/diff/200001/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html#newcode12 third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html:12: testRunner.dumpAsText(); On 2016/06/01 19:48:54, dgozman wrote: > Harness ...
4 years, 6 months ago (2016-06-02 23:35:18 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003253002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2003253002/260001
4 years, 6 months ago (2016-06-02 23:37:16 UTC) #32
yhirano
lgtm
4 years, 6 months ago (2016-06-03 02:15:09 UTC) #33
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-03 02:43:29 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003253002/260001
4 years, 6 months ago (2016-06-03 17:45:53 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/194850)
4 years, 6 months ago (2016-06-03 17:54:22 UTC) #40
Allada-Google
PTL @ content/common/websocket_messages.h
4 years, 6 months ago (2016-06-03 18:01:08 UTC) #42
Tom Sepez
https://codereview.chromium.org/2003253002/diff/260001/content/common/websocket_messages.h File content/common/websocket_messages.h (right): https://codereview.chromium.org/2003253002/diff/260001/content/common/websocket_messages.h#newcode74 content/common/websocket_messages.h:74: std::string /* additional_headers */, Seems like a bad idea ...
4 years, 6 months ago (2016-06-03 18:08:40 UTC) #45
allada
PTL @ Tom Sepez https://codereview.chromium.org/2003253002/diff/260001/content/common/websocket_messages.h File content/common/websocket_messages.h (right): https://codereview.chromium.org/2003253002/diff/260001/content/common/websocket_messages.h#newcode74 content/common/websocket_messages.h:74: std::string /* additional_headers */, On ...
4 years, 6 months ago (2016-06-03 23:48:58 UTC) #46
Tom Sepez
> I would be ok with passing a header struct that only allow certain headers ...
4 years, 6 months ago (2016-06-06 16:10:25 UTC) #48
Charlie Reis
On 2016/06/06 16:10:25, Tom Sepez wrote: > > I would be ok with passing a ...
4 years, 6 months ago (2016-06-06 23:34:39 UTC) #49
Tom Sepez
> Yes, it seems like it would be able to pass an arbitrary Origin header ...
4 years, 6 months ago (2016-06-07 15:49:58 UTC) #50
pfeldman
https://codereview.chromium.org/2003253002/diff/260001/content/common/websocket_messages.h File content/common/websocket_messages.h (right): https://codereview.chromium.org/2003253002/diff/260001/content/common/websocket_messages.h#newcode73 content/common/websocket_messages.h:73: url::Origin /* origin */, @tsepez, @creis: should we rename ...
4 years, 6 months ago (2016-06-08 00:11:39 UTC) #52
Tom Sepez
On 2016/06/08 00:11:39, pfeldman wrote: > https://codereview.chromium.org/2003253002/diff/260001/content/common/websocket_messages.h > File content/common/websocket_messages.h (right): > > https://codereview.chromium.org/2003253002/diff/260001/content/common/websocket_messages.h#newcode73 > ...
4 years, 6 months ago (2016-06-08 16:44:19 UTC) #53
Tom Sepez
> Yes, a design where only the value part of a user-agent header comes from ...
4 years, 6 months ago (2016-06-08 16:46:14 UTC) #54
allada
PTL After speaking to pfeldman@ he suggested that I only pass user-agent-override then have browser ...
4 years, 6 months ago (2016-06-21 01:39:06 UTC) #60
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2003253002/360001
4 years, 6 months ago (2016-06-21 01:46:55 UTC) #62
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-21 03:14:34 UTC) #64
dgozman
https://codereview.chromium.org/2003253002/diff/360001/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html File third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html (right): https://codereview.chromium.org/2003253002/diff/360001/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html#newcode7 third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html:7: function openWebSocket(url) { style: { on the new line ...
4 years, 6 months ago (2016-06-21 17:32:48 UTC) #65
allada
https://codereview.chromium.org/2003253002/diff/360001/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html File third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html (right): https://codereview.chromium.org/2003253002/diff/360001/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html#newcode7 third_party/WebKit/LayoutTests/http/tests/inspector-protocol/websocket/websocket-user-agent-override.html:7: function openWebSocket(url) { On 2016/06/21 17:32:48, dgozman wrote: > ...
4 years, 6 months ago (2016-06-21 17:40:28 UTC) #66
Charlie Reis
On 2016/06/21 01:39:06, Blaise wrote: > PTL > > After speaking to pfeldman@ he suggested ...
4 years, 6 months ago (2016-06-21 18:49:52 UTC) #67
Tom Sepez
I think this is OK now, LGTM.
4 years, 5 months ago (2016-06-26 15:34:05 UTC) #68
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2003253002/380001
4 years, 5 months ago (2016-06-27 17:42:14 UTC) #70
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/27298) ios-simulator-gn on ...
4 years, 5 months ago (2016-06-27 17:46:04 UTC) #72
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2003253002/400001
4 years, 5 months ago (2016-06-27 19:55:23 UTC) #74
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-27 21:46:19 UTC) #76
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/2003253002/400001
4 years, 5 months ago (2016-06-27 22:50:14 UTC) #79
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/208048)
4 years, 5 months ago (2016-06-27 23:03:56 UTC) #81
allada
PTL
4 years, 5 months ago (2016-06-27 23:33:34 UTC) #83
Charlie Reis
On 2016/06/27 23:33:34, Blaise wrote: > PTL Who are you asking to look?
4 years, 5 months ago (2016-06-27 23:43:40 UTC) #84
allada
On 2016/06/27 23:43:40, Charlie Reis wrote: > On 2016/06/27 23:33:34, Blaise wrote: > > PTL ...
4 years, 5 months ago (2016-06-28 00:36:26 UTC) #85
Ilya Sherman
histograms.xml lgtm
4 years, 5 months ago (2016-06-28 03:12:16 UTC) #86
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/2003253002/400001
4 years, 5 months ago (2016-06-28 18:46:03 UTC) #88
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/208675)
4 years, 5 months ago (2016-06-28 18:55:17 UTC) #90
Charlie Reis
content/browser/bad_message.h (and the BadMessageReceived call) LGTM. (I haven't looked closely at the rest, but it ...
4 years, 5 months ago (2016-06-28 21:43:07 UTC) #91
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/2003253002/400001
4 years, 5 months ago (2016-06-28 22:43:57 UTC) #93
commit-bot: I haz the power
Committed patchset #9 (id:400001)
4 years, 5 months ago (2016-06-29 01:00:16 UTC) #95
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/8031445e44e495dfdcc8011f05323a9e479596c7 Cr-Commit-Position: refs/heads/master@{#402627}
4 years, 5 months ago (2016-06-29 01:02:04 UTC) #97
allada
The revert to this patch was not relevant to the tests that were failing. In ...
4 years, 5 months ago (2016-06-29 17:29:15 UTC) #99
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2003253002/400001
4 years, 5 months ago (2016-06-29 17:30:35 UTC) #101
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-29 17:40:57 UTC) #103
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/2003253002/400001
4 years, 5 months ago (2016-06-29 17:43:44 UTC) #105
commit-bot: I haz the power
Committed patchset #9 (id:400001)
4 years, 5 months ago (2016-06-29 17:52:42 UTC) #107
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-29 17:52:50 UTC) #108
commit-bot: I haz the power
4 years, 5 months ago (2016-06-29 17:54:27 UTC) #110
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/cef397d06a9527ee4a3895572d448ba1e9377ca0
Cr-Commit-Position: refs/heads/master@{#402862}

Powered by Google App Engine
This is Rietveld 408576698