New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 721400 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug

Blocking:
issue 598073



Sign in to add a comment

WebSockets needs to work with the network service

Project Member Reported by jam@chromium.org, May 11 2017

Issue description

When the network service is in use (--enable-network-service, see also parent bug), WebSockets requests should be made through the service.

We had an implementation of this in the old mandoline network service, see https://codereview.chromium.org/1873463003/ for inspiration.
 

Comment 1 by jam@chromium.org, May 11 2017

Blocking: -598073
WebSockets owners: can you help with this task? thanks

Comment 2 Deleted

IIUC what websockets does is a subset of what other parts in net do. So I would like to wait the other parts to find their solutions, and then use them for websockets. Does it make sense?

Comment 4 by ricea@chromium.org, May 19 2017

Implementing this basically just means moving //content/browser/websockets into //net.

A possibly incomplete list of non-net hooks we need:
* SSL handshake failure handling
* Extensions
* Safe browsing

As yhirano said, once solutions are in place for doing this stuff for HTTP, adapting it for WebSockets should be trivial.

Comment 5 by jam@chromium.org, May 19 2017

@ricea I'm not sure what you mean by moving content/browser/websockets into /net? afaik that code translates IPC from the renderer into net/ calls where the websocket code lives. We still need a layer that handles IPC with mojo service.

We already have a network service that can handle http/https. Perhaps a VC to talk through this would clarify things?
Labels: Proj-Servicification
Status: Available (was: Untriaged)
Tentatively marking as available with P2.
Cc: -ricea@chromium.org
Owner: ricea@chromium.org
Status: Assigned (was: Available)
Tentatively assigning to ricea@.

Comment 8 by dougt@chromium.org, Sep 29 2017

Blocking: 598073

Comment 9 by dougt@chromium.org, Oct 18 2017

Owner: ----
Status: Available (was: Assigned)
unassigning due to lack of movement
Cc: ricea@chromium.org
OK, dougt@. My understanding is that this work is not yet blocking any urgent s13n work. So, we're giving less priority to it. That's why there has been no activity. If it's wrong, let us know. ricea@ would work on it.

A bit of context I heard from side-channel: this is not blocking other work, while //content tests with s13n Network Service are starting to pass about 99%, that means that this might start to block the finishing date of the entire work at some point.
All right. I'd reprioritize this after having a little more sync with kinuko@ and ricea@ offline.

Comment 13 by dougt@chromium.org, Oct 20 2017

Components: Internals>Network>Service
Components: -Internals>Network>Service Internals>Services>Network
Apologies, applied the wrong component in bulk.
Owner: yhirano@chromium.org
Status: Assigned (was: Available)
Let me make a try.
Project Member

Comment 16 by bugdroid1@chromium.org, Mar 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b921591d3b1d4edfa33ec9682b153d6048082b12

commit b921591d3b1d4edfa33ec9682b153d6048082b12
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Fri Mar 16 05:23:54 2018

Move websocket.mojom from third_party/WebKit to services/network

As a preparation to integrate websocket with the network service, this
CL moves the mojom file to /services/network.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I1284cbd9dd3292c41d1acba34835c6c6d44d48a3
Reviewed-on: https://chromium-review.googlesource.com/961173
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543632}
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/content/browser/renderer_interface_binders.cc
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/content/browser/websockets/README.md
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/content/browser/websockets/websocket_impl.cc
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/content/browser/websockets/websocket_impl.h
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/content/browser/websockets/websocket_manager.cc
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/content/browser/websockets/websocket_manager.h
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/content/browser/websockets/websocket_manager_unittest.cc
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/services/network/public/mojom/BUILD.gn
[rename] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/services/network/public/mojom/websocket.mojom
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/third_party/WebKit/Source/modules/websockets/DEPS
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.cpp
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.h
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
[modify] https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12/third_party/WebKit/public/BUILD.gn
[delete] https://crrev.com/1385637859567aa79a5989e9f5415845e4e90048/third_party/WebKit/public/platform/modules/websockets/OWNERS

Project Member

Comment 17 by bugdroid1@chromium.org, Mar 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/31afadd2e5e8d2d43490c82d31202bafda974762

commit 31afadd2e5e8d2d43490c82d31202bafda974762
Author: Anita Woodruff <awdf@chromium.org>
Date: Fri Mar 16 16:20:30 2018

Revert "Move websocket.mojom from third_party/WebKit to services/network"

This reverts commit b921591d3b1d4edfa33ec9682b153d6048082b12.

Reason for revert:
Probable cause of WebView segfault in https://crbug.com/822732

Original change's description:
> Move websocket.mojom from third_party/WebKit to services/network
> 
> As a preparation to integrate websocket with the network service, this
> CL moves the mojom file to /services/network.
> 
> Bug:  721400 
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
> Change-Id: I1284cbd9dd3292c41d1acba34835c6c6d44d48a3
> Reviewed-on: https://chromium-review.googlesource.com/961173
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#543632}

TBR=kinuko@chromium.org,jam@chromium.org,yhirano@chromium.org

Change-Id: I6062a78052b82364418c9f57ab768c8f001cb549
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  721400 ,822732
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/966761
Reviewed-by: Anita Woodruff <awdf@chromium.org>
Commit-Queue: Anita Woodruff <awdf@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543720}
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/content/browser/renderer_interface_binders.cc
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/content/browser/websockets/README.md
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/content/browser/websockets/websocket_impl.cc
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/content/browser/websockets/websocket_impl.h
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/content/browser/websockets/websocket_manager.cc
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/content/browser/websockets/websocket_manager.h
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/content/browser/websockets/websocket_manager_unittest.cc
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/services/network/public/mojom/BUILD.gn
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/Source/modules/websockets/DEPS
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.cpp
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.h
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
[modify] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/public/platform/modules/websockets/OWNERS
[rename] https://crrev.com/31afadd2e5e8d2d43490c82d31202bafda974762/third_party/WebKit/public/platform/modules/websockets/websocket.mojom

Project Member

Comment 18 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0a87aa0aa4a5a63890728c79678f52b94aaef5e7

commit 0a87aa0aa4a5a63890728c79678f52b94aaef5e7
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Thu Mar 22 23:13:52 2018

Move websocket.mojom from third_party/WebKit to services/network

This is a reland of https://crrev.com/b921591d3b1d4edfa33ec9682b153d6048082b12.

As a preparation to integrate websocket with the network service, this
CL moves the mojom file to /services/network.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Ie2caa926ed5edf6d6fabf41548574e6fdbc64872
Reviewed-on: https://chromium-review.googlesource.com/975361
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545282}
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/content/browser/renderer_interface_binders.cc
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/content/browser/websockets/README.md
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/content/browser/websockets/websocket_impl.cc
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/content/browser/websockets/websocket_impl.h
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/content/browser/websockets/websocket_manager.cc
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/content/browser/websockets/websocket_manager.h
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/content/browser/websockets/websocket_manager_unittest.cc
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/services/network/public/mojom/BUILD.gn
[rename] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/services/network/public/mojom/websocket.mojom
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/third_party/WebKit/Source/modules/websockets/DEPS
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.cpp
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.h
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
[modify] https://crrev.com/0a87aa0aa4a5a63890728c79678f52b94aaef5e7/third_party/WebKit/public/BUILD.gn
[delete] https://crrev.com/fc63d3995a0ebff5dad757e24077fb8c4ac5065b/third_party/WebKit/public/platform/modules/websockets/OWNERS

Project Member

Comment 19 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c6d58b8c83e7bb13340b0ee9784b289252c122a6

commit c6d58b8c83e7bb13340b0ee9784b289252c122a6
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Fri Mar 23 08:40:02 2018

Have content::WebSocketImpl independent of content/[public/]browser

As a preparation to move WebSocketImpl to services/network, this CL
moves content-dependent part out of the class.

Bug:  721400 
Change-Id: Ib2e708a2d57470dd1bb2b54820d6a5b36212fac3
Reviewed-on: https://chromium-review.googlesource.com/964040
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545387}
[modify] https://crrev.com/c6d58b8c83e7bb13340b0ee9784b289252c122a6/content/browser/websockets/websocket_impl.cc
[modify] https://crrev.com/c6d58b8c83e7bb13340b0ee9784b289252c122a6/content/browser/websockets/websocket_impl.h
[modify] https://crrev.com/c6d58b8c83e7bb13340b0ee9784b289252c122a6/content/browser/websockets/websocket_manager.cc
[modify] https://crrev.com/c6d58b8c83e7bb13340b0ee9784b289252c122a6/content/browser/websockets/websocket_manager.h
[modify] https://crrev.com/c6d58b8c83e7bb13340b0ee9784b289252c122a6/content/browser/websockets/websocket_manager_unittest.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b6a6ff2a26a89cfcaffb1081aa0eceebfe2a8a93

commit b6a6ff2a26a89cfcaffb1081aa0eceebfe2a8a93
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Fri Mar 23 08:49:12 2018

Move WebSocketImpl to services/network

... so that we can use it in the network service.

This CL also changes its name to WebSocket.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Ibab96d59031662e79a97efa3b2b84a9e3a096612
Reviewed-on: https://chromium-review.googlesource.com/964101
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545389}
[modify] https://crrev.com/b6a6ff2a26a89cfcaffb1081aa0eceebfe2a8a93/content/browser/BUILD.gn
[modify] https://crrev.com/b6a6ff2a26a89cfcaffb1081aa0eceebfe2a8a93/content/browser/websockets/websocket_manager.cc
[modify] https://crrev.com/b6a6ff2a26a89cfcaffb1081aa0eceebfe2a8a93/content/browser/websockets/websocket_manager.h
[modify] https://crrev.com/b6a6ff2a26a89cfcaffb1081aa0eceebfe2a8a93/content/browser/websockets/websocket_manager_unittest.cc
[modify] https://crrev.com/b6a6ff2a26a89cfcaffb1081aa0eceebfe2a8a93/services/network/BUILD.gn
[rename] https://crrev.com/b6a6ff2a26a89cfcaffb1081aa0eceebfe2a8a93/services/network/websocket.cc
[rename] https://crrev.com/b6a6ff2a26a89cfcaffb1081aa0eceebfe2a8a93/services/network/websocket.h

Project Member

Comment 21 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46

commit 24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Fri Mar 23 08:55:12 2018

Have WebSocket work with Network Service

This CL integrates WebSocket with the network service if it's enabled.
Before this CL, blink used WebSocket in content/browser even when
the network service is enabled. As a result, cookies were not shared
between the usual requests and WebSockets. This CL fixes the test
failures.

On the other hand, the WebSocket implementation living in
/services/network still lacks some functionalities, which results in
new test failures.

 - http/tests/security/cookies/websocket/third-party-cookie...
   I guess these failures share the same cause with
   http/tests/security/cookies/third-party... failures, and will be
   fixed altogether.
 - http/tests/websocket/multiple-connections-throttled.html
   This will be fixed the the throttling is implemented.
 - http/tests/devtools/websocket/websocket-handshake.js
   I don't know why this test fails. I will investigate.
 - Browser tests
   This is caused by the lack of WebRequest API support. I will work
   on it.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I8553be467e88f34929f5585376bdadd31b043e17
Reviewed-on: https://chromium-review.googlesource.com/964105
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545390}
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/content/browser/frame_host/render_frame_host_impl.h
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/content/browser/renderer_interface_binders.cc
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/content/browser/websockets/websocket_manager.cc
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/media/cast/net/udp_socket_client_unittest.cc
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/services/network/BUILD.gn
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/services/network/network_context.cc
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/services/network/network_context.h
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/services/network/public/mojom/network_service.mojom
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/services/network/websocket.cc
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/services/network/websocket.h
[add] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/services/network/websocket_factory.cc
[add] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/services/network/websocket_factory.h
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
[modify] https://crrev.com/24632bb4e9d1d1a40fa34e3c62dd7ad87521fc46/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService

Comment 22 by ricea@chromium.org, Mar 26 2018

I am investigating the failure of http/tests/devtools/websocket/websocket-handshake.js. My findings so far:

The test fails because brotli is not enabled (so the Accept-Encoding header doesn't match).
With the network service, brotli is enabled in the NetworkContextParams.

It's not currently clear to me why this isn't being picked up by the WebSocket connections.

Comment 23 by ricea@chromium.org, Mar 26 2018

Update: brotli is enabled in content_shell. It's something peculiar to the environment the Layout test is being run in.

Comment 24 by ricea@chromium.org, Mar 26 2018

I had it backwards. content_shell normally doesn't have brotli enabled. The enable-brotli feature is set in chrome/browser/net/default_network_context_params.cc. The fact that enabling the network service also enables brotli appears to be unintended.

Comment 25 by ricea@chromium.org, Mar 26 2018

I filed  issue 825687  about Brotli being enabled by the network service, since it is not WebSocket-specific.
Thank you, Adam!
Project Member

Comment 27 by bugdroid1@chromium.org, Mar 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e55d7a3718dba9fe5d451cf899bef669ba02473

commit 8e55d7a3718dba9fe5d451cf899bef669ba02473
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Mon Mar 26 12:28:42 2018

Have WebSocket throttling work with Network Service

This CL introduces WebSocket throttling on network::WebSocketFactory by
moving some logic from content/browser/websockets to services/network.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Ie007765411d95d1854fc0271652d599e5ccbcd0c
Reviewed-on: https://chromium-review.googlesource.com/979872
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545766}
[modify] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/content/browser/websockets/websocket_manager.cc
[modify] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/content/browser/websockets/websocket_manager.h
[modify] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/content/browser/websockets/websocket_manager_unittest.cc
[modify] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/services/network/BUILD.gn
[modify] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/services/network/websocket.cc
[modify] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/services/network/websocket.h
[modify] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/services/network/websocket_factory.cc
[modify] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/services/network/websocket_factory.h
[add] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/services/network/websocket_throttler.cc
[add] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/services/network/websocket_throttler.h
[add] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/services/network/websocket_throttler_unittest.cc
[modify] https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService

This broke the tree. Reverting.
[644/1671] CXX obj/services/network/network_service/websocket_throttler.obj
FAILED: obj/services/network/network_service/websocket_throttler.obj 
ninja -t msvc -e environment.x64 -- C:\b\c\goma_client/gomacc.exe "c:\b\c\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\vc\tools\msvc\14.11.25503\bin\hostx64\x64/cl.exe" /nologo /showIncludes  -DIS_NETWORK_SERVICE_IMPL -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_HAS_EXCEPTIONS=0 -DCOMPONENT_BUILD -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=1 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A000002 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DPROTOBUF_USE_DLLS -DBORINGSSL_SHARED_LIBRARY -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=wchar_t -I../.. -Igen -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n /wd4117 /D__DATE__= /D__TIME__= /D__TIMESTAMP__= /Gy /FS /bigobj /d2FastFail /Zc:sizedDealloc- /W4 /WX /utf-8 /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /Od /Ob0 /GF /MDd /wd4267 /TP /wd4577 /GR- /c ../../services/network/websocket_throttler.cc /Foobj/services/network/network_service/websocket_throttler.obj /Fd"obj/services/network/network_service_cc.pdb"
c:\b\c\b\win\src\services\network\websocket_throttler.cc(54) : error C2220: warning treated as error - no 'object' file generated
c:\b\c\b\win\src\services\network\websocket_throttler.cc(54) : warning C4702: unreachable code
Project Member

Comment 29 by bugdroid1@chromium.org, Mar 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7180bf323069eab7863a59ee3800ca23fbfdb2c9

commit 7180bf323069eab7863a59ee3800ca23fbfdb2c9
Author: Dominic Battre <battre@chromium.org>
Date: Mon Mar 26 13:37:15 2018

Hotfix for broken compilation

TBR=yhirano@chromium.org,ricea@chromium.org
notry=true

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I783bbf75592236dd33b168ccf7b3cb958ec4cbc2
Reviewed-on: https://chromium-review.googlesource.com/980315
Commit-Queue: Dominic Battré <battre@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545774}
[modify] https://crrev.com/7180bf323069eab7863a59ee3800ca23fbfdb2c9/services/network/websocket_throttler.cc

Decided against revert because of merge conflicts and applied this hotfix. Fingers crossed...

Comment 31 by ricea@chromium.org, Mar 27 2018

#28 Sorry I missed this. I guess VS is no longer on the CQ? Weird that clang doesn't perform the same check. Maybe it's just disabled.
 Issue 803958  has been merged into this issue.
Project Member

Comment 33 by bugdroid1@chromium.org, Mar 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e4e4a05b32637ab65101985b0aa17d2b240bf94

commit 6e4e4a05b32637ab65101985b0aa17d2b240bf94
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Tue Mar 27 07:01:07 2018

Fix websocket throttling unittests

I moved some unittests in [1] but I did it wrongly.

The original tests added N pending connections and measured the delay for
the Nth connection. The new tests add N pending connections and measured
the delay which will be used for a new connection (i.e., the N+1th
connection).

This CL fixes the issue.

1: https://crrev.com/8e55d7a3718dba9fe5d451cf899bef669ba02473

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Iee4c31414a217496df104c5194452e874be63c5a
Reviewed-on: https://chromium-review.googlesource.com/981960
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546042}
[modify] https://crrev.com/6e4e4a05b32637ab65101985b0aa17d2b240bf94/services/network/websocket_throttler_unittest.cc

Project Member

Comment 34 by bugdroid1@chromium.org, Mar 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/61adfd22de82644065d2743191b37d3c96307181

commit 61adfd22de82644065d2743191b37d3c96307181
Author: Adam Rice <ricea@chromium.org>
Date: Tue Mar 27 09:25:42 2018

Eliminate usage of SupportsWeakPtr from WebSocketFactory

Inheriting from SupportsWeakPtr<T> is error-prone because weak pointers
are not invalidated until the parent object has been partially
destroyed.

Use WeakPtrFactory instead in WebSocketFactory::Delegate.
WebSocketFactory doesn't need weak pointers at all, so remove it
completely from there.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I94f8dc6fa20b4ede14295760db44bdeaae207610
Reviewed-on: https://chromium-review.googlesource.com/981964
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546074}
[modify] https://crrev.com/61adfd22de82644065d2743191b37d3c96307181/services/network/websocket_factory.cc
[modify] https://crrev.com/61adfd22de82644065d2743191b37d3c96307181/services/network/websocket_factory.h

Project Member

Comment 35 by bugdroid1@chromium.org, Mar 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/84b64b4d3478fb3e899318810edf327bb30bb158

commit 84b64b4d3478fb3e899318810edf327bb30bb158
Author: Adam Rice <ricea@chromium.org>
Date: Wed Mar 28 15:00:20 2018

WebSocketPerProcessThrottler: Stop using SupportsWeakPtr

Stop using the error-prone base::SupportsWeakPtr in
WebSocketPerProcessThrottler. Use base::WeakPtrFactory instead.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I802bc2c71290ed80476630eecae38ab0858c5e10
Reviewed-on: https://chromium-review.googlesource.com/983089
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546485}
[modify] https://crrev.com/84b64b4d3478fb3e899318810edf327bb30bb158/services/network/websocket_throttler.cc
[modify] https://crrev.com/84b64b4d3478fb3e899318810edf327bb30bb158/services/network/websocket_throttler.h

Project Member

Comment 38 by bugdroid1@chromium.org, Apr 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/86c6f785ad1f00343ce9a0d4c46973d4d510a623

commit 86c6f785ad1f00343ce9a0d4c46973d4d510a623
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Fri Apr 27 02:59:30 2018

Add histograms for WebRequest API usage for websocket connections

We're considering removing some WebRequest API functionalities from
WebSocket to support Network Service. This CL adds histograms to
measure whether such features are actually used.

Bug:  721400 
Change-Id: If59ee6b0a0103a06a3a4dc70c57ba756c4a2c751
Reviewed-on: https://chromium-review.googlesource.com/1027670
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554272}
[modify] https://crrev.com/86c6f785ad1f00343ce9a0d4c46973d4d510a623/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
[modify] https://crrev.com/86c6f785ad1f00343ce9a0d4c46973d4d510a623/extensions/browser/api/web_request/web_request_api.cc
[modify] https://crrev.com/86c6f785ad1f00343ce9a0d4c46973d4d510a623/extensions/browser/api/web_request/web_request_api_helpers.cc
[modify] https://crrev.com/86c6f785ad1f00343ce9a0d4c46973d4d510a623/extensions/browser/api/web_request/web_request_api_helpers.h
[modify] https://crrev.com/86c6f785ad1f00343ce9a0d4c46973d4d510a623/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/86c6f785ad1f00343ce9a0d4c46973d4d510a623/tools/metrics/histograms/histograms.xml

Cc: jam@chromium.org
Labels: Merge-Request-66
I'd like to merge https://crrev.com/86c6f785ad1f00343ce9a0d4c46973d4d510a623 to beta so that we can get the data earlier.
Labels: -Merge-Request-66 Merge-Request-67
Oops, not 66, but 67.
Pls apply appropriate OSs label. Thank you.
Labels: OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac OS-Windows
Project Member

Comment 43 by sheriffbot@chromium.org, Apr 27 2018

Labels: -Merge-Request-67 Merge-Review-67 Hotlist-Merge-Review
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Before we approve merge for CL: https://crrev.com/86c6f785ad1f00343ce9a0d4c46973d4d510a623 to M67, please answer followings:

* Is the change well baked/verified in Canary, having enough automation tests coverage and safe to merge to M67?
* Any other important details to justify the merge.

Please note M67 is already in Beta, so merge bar is very high. Thank you.

Comment 45 by jam@chromium.org, Apr 27 2018

@govind: this is a very low risk change that'll give us data we need to figure out if we can change some extensions API. We'd really prefer not to wait an extra 6 weeks to get this data.
Labels: -Merge-Review-67 Merge-Approved-67
Approving merge to M67 branch 3396 based on comment #45. Please merge ASAP so we can pick it up for next week M67 Beta release. Thank you.
Approving merge for CL: https://crrev.com/86c6f785ad1f00343ce9a0d4c46973d4d510a623 to M67 branch 3396 based on comment #45. Please merge ASAP so we can pick it up for next week M67 Beta release. Thank you.
Project Member

Comment 48 by bugdroid1@chromium.org, Apr 30 2018

Labels: -merge-approved-67 merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5e77f1b21bf1b0659e56238cc3537e32f3104427

commit 5e77f1b21bf1b0659e56238cc3537e32f3104427
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Mon Apr 30 14:08:38 2018

Add histograms for WebRequest API usage for websocket connections

We're considering removing some WebRequest API functionalities from
WebSocket to support Network Service. This CL adds histograms to
measure whether such features are actually used.

Bug:  721400 
Change-Id: If59ee6b0a0103a06a3a4dc70c57ba756c4a2c751
Reviewed-on: https://chromium-review.googlesource.com/1027670
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#554272}(cherry picked from commit 86c6f785ad1f00343ce9a0d4c46973d4d510a623)
Reviewed-on: https://chromium-review.googlesource.com/1034922
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/branch-heads/3396@{#374}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/5e77f1b21bf1b0659e56238cc3537e32f3104427/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
[modify] https://crrev.com/5e77f1b21bf1b0659e56238cc3537e32f3104427/extensions/browser/api/web_request/web_request_api.cc
[modify] https://crrev.com/5e77f1b21bf1b0659e56238cc3537e32f3104427/extensions/browser/api/web_request/web_request_api_helpers.cc
[modify] https://crrev.com/5e77f1b21bf1b0659e56238cc3537e32f3104427/extensions/browser/api/web_request/web_request_api_helpers.h
[modify] https://crrev.com/5e77f1b21bf1b0659e56238cc3537e32f3104427/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/5e77f1b21bf1b0659e56238cc3537e32f3104427/tools/metrics/histograms/histograms.xml

Project Member

Comment 49 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2f65eec4018459386c042003658f9d991f5aadde

commit 2f65eec4018459386c042003658f9d991f5aadde
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Wed May 23 01:58:22 2018

[websocket] Use HttpRequestHeaders, not string, to represent headers

net::WebSocketChannel and various related classes use std::string to
represent request headers. This CL changes them to HttpRequestHeaders.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Id730779b36f3a319a61b44516bd3e8389ebdfc23
Reviewed-on: https://chromium-review.googlesource.com/1065713
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560888}
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/content/browser/bad_message.h
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/content/browser/websockets/websocket_manager.cc
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_channel.cc
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_channel.h
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_channel_test.cc
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_end_to_end_test.cc
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_stream.cc
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_stream.h
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_stream_cookie_test.cc
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_stream_create_test_base.cc
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_stream_create_test_base.h
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_stream_test.cc
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_test_util.cc
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/net/websockets/websocket_test_util.h
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/services/network/websocket.cc
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/services/network/websocket.h
[modify] https://crrev.com/2f65eec4018459386c042003658f9d991f5aadde/tools/metrics/histograms/enums.xml

Project Member

Comment 50 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cada5cf3ecc42d70f66fc8178ac0e862685eb1d5

commit cada5cf3ecc42d70f66fc8178ac0e862685eb1d5
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Wed May 23 09:20:17 2018

Add histograms for WebRequest API usage for websocket connections

We're considering removing some WebRequest API functionalities from
WebSocket to support Network Service. This CL adds histograms to
measure whether such features are actually used.

Bug:  721400 
Change-Id: Ia975966291e80233b0c46d9c462c06d4766f8da9
Reviewed-on: https://chromium-review.googlesource.com/1059092
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561015}
[modify] https://crrev.com/cada5cf3ecc42d70f66fc8178ac0e862685eb1d5/extensions/browser/api/web_request/web_request_api_helpers.cc
[modify] https://crrev.com/cada5cf3ecc42d70f66fc8178ac0e862685eb1d5/tools/metrics/histograms/histograms.xml

Project Member

Comment 51 by bugdroid1@chromium.org, May 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c960cc2db8cf9e4f843c06a7cccbfb2676c7ea1

commit 6c960cc2db8cf9e4f843c06a7cccbfb2676c7ea1
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Thu May 24 05:34:38 2018

Remove WebSocketChannel::HandshakeNotificationSender

It was needed because "it's hard to handle IPC errors synchronously",
but we don't have that problem now with mojo IPC. It is not only
redundant but also harmful because it breaks a WebSocketClient contract:
OnFinishOpeningHandshake must precede OnAddChannelResponse.

Bug:  721400 
Change-Id: Idd475140d4aef1d49f001855ff80fcf8d5f99cda
Reviewed-on: https://chromium-review.googlesource.com/1068784
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561392}
[modify] https://crrev.com/6c960cc2db8cf9e4f843c06a7cccbfb2676c7ea1/net/websockets/websocket_channel.cc
[modify] https://crrev.com/6c960cc2db8cf9e4f843c06a7cccbfb2676c7ea1/net/websockets/websocket_channel.h

Project Member

Comment 52 by bugdroid1@chromium.org, May 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/208d4dcefb03bc44b73d05be823f78c4bc11dc5a

commit 208d4dcefb03bc44b73d05be823f78c4bc11dc5a
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Thu May 24 09:22:12 2018

Remove status_code and status_text from WebSocketHandshakeResponseInfo

They are contained in net::HttpResponseHeaders which is also contained
in the struct.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I11b438790fc351ba9097bb44415c5c5c4ca923c3
Reviewed-on: https://chromium-review.googlesource.com/1071327
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561436}
[modify] https://crrev.com/208d4dcefb03bc44b73d05be823f78c4bc11dc5a/net/websockets/websocket_channel_test.cc
[modify] https://crrev.com/208d4dcefb03bc44b73d05be823f78c4bc11dc5a/net/websockets/websocket_handshake_response_info.cc
[modify] https://crrev.com/208d4dcefb03bc44b73d05be823f78c4bc11dc5a/net/websockets/websocket_handshake_response_info.h
[modify] https://crrev.com/208d4dcefb03bc44b73d05be823f78c4bc11dc5a/net/websockets/websocket_stream.cc
[modify] https://crrev.com/208d4dcefb03bc44b73d05be823f78c4bc11dc5a/net/websockets/websocket_stream_test.cc
[modify] https://crrev.com/208d4dcefb03bc44b73d05be823f78c4bc11dc5a/services/network/websocket.cc

Project Member

Comment 53 by bugdroid1@chromium.org, May 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4d42aab358bc7e79998832d81cd8c8cdb1a53352

commit 4d42aab358bc7e79998832d81cd8c8cdb1a53352
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Mon May 28 03:02:28 2018

Add additional_headers for WebSocket::AddChannelRequest

We are going to allow extensions to add additional headers, so this CL
replaces |user_agent_override| with |additional_headers| in
websocket.mojom.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I0637c1bcd8b1b9f20d6f942014361b10ca74eec1
Reviewed-on: https://chromium-review.googlesource.com/1059003
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562170}
[modify] https://crrev.com/4d42aab358bc7e79998832d81cd8c8cdb1a53352/services/network/public/mojom/websocket.mojom
[modify] https://crrev.com/4d42aab358bc7e79998832d81cd8c8cdb1a53352/services/network/websocket.cc
[modify] https://crrev.com/4d42aab358bc7e79998832d81cd8c8cdb1a53352/services/network/websocket.h
[modify] https://crrev.com/4d42aab358bc7e79998832d81cd8c8cdb1a53352/third_party/blink/renderer/modules/websockets/websocket_handle_impl.cc

Comment 54 by dxie@chromium.org, May 29 2018

Labels: Proj-Servicification-Canary
Project Member

Comment 55 by bugdroid1@chromium.org, May 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f3180c07926a7a70ba1e9f867ab37eddc0526a0e

commit f3180c07926a7a70ba1e9f867ab37eddc0526a0e
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Tue May 29 23:07:13 2018

Introduce WebRequestAPI::Proxy and WebRequestAPI::ProxySet

Currently WebRequestProxyingURLLoaderFactory instances are held in
WebRequestAPI as a std::map<scoped_refptr<...>>. I'm going to introduce
a similar class, WebRequestProxingWebSocket, and have WebRequestAPI
hold the instances in the same manner, and as a preparation this CL
defines a pure interface, Proxy, as a common interface for them, and
defines ProxySet for the set of proxies in a WebRequestAPI instance.

This CL also makes WebRequestProxyingURLLoaderFactory held by
std::unique_ptr, rather than scoped_refptr. As a result, the class is
completely bound to the IO thread.

Bug:  721400 
Change-Id: Ie7293c61a1064e578907ab57c55da0a7143e52fd
Reviewed-on: https://chromium-review.googlesource.com/1073183
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562644}
[modify] https://crrev.com/f3180c07926a7a70ba1e9f867ab37eddc0526a0e/extensions/browser/api/web_request/web_request_api.cc
[modify] https://crrev.com/f3180c07926a7a70ba1e9f867ab37eddc0526a0e/extensions/browser/api/web_request/web_request_api.h
[modify] https://crrev.com/f3180c07926a7a70ba1e9f867ab37eddc0526a0e/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc
[modify] https://crrev.com/f3180c07926a7a70ba1e9f867ab37eddc0526a0e/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h

Project Member

Comment 56 by bugdroid1@chromium.org, May 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/36c949511c8c72f5ad3b7d47d3c597b899976b17

commit 36c949511c8c72f5ad3b7d47d3c597b899976b17
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Wed May 30 21:33:33 2018

WebSocket + WebRequest API + Network Service

With this change, WebRequest API for WebSocket works when the network
service is enabled.

This CL introduces WebRequestProxyingWebSocket, a proxy which
dispatches WebRequest API events to extensions. This CL modifies
websocket.mojom as following:

 - OnFinishOpeningHandshake is always dispatched. When the renderer
   doesn't have an access to raw cookies access, it drops cookie
   related information from the headers.
 - socket_address and http_version is added to
   WebSocketHandshakeResponse.

This change lacks OnAuthRequired support.

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Ic564518a820e4f010548263863e523062da7345e
Reviewed-on: https://chromium-review.googlesource.com/1068592
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563001}
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/content/public/browser/content_browser_client.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/content/public/browser/content_browser_client.h
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/extensions/browser/api/web_request/BUILD.gn
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/extensions/browser/api/web_request/web_request_api.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/extensions/browser/api/web_request/web_request_api.h
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h
[add] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/extensions/browser/api/web_request/web_request_proxying_websocket.cc
[add] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/extensions/browser/api/web_request/web_request_proxying_websocket.h
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/net/http/http_response_headers.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/net/http/http_response_headers.h
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/net/websockets/websocket_basic_handshake_stream.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/net/websockets/websocket_channel_test.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/net/websockets/websocket_handshake_response_info.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/net/websockets/websocket_handshake_response_info.h
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/net/websockets/websocket_http2_handshake_stream.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/net/websockets/websocket_stream.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/net/websockets/websocket_stream.h
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/services/network/public/cpp/network_ipc_param_traits.h
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/services/network/public/cpp/network_param.typemap
[add] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/services/network/public/cpp/network_param_mojom_traits.cc
[add] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/services/network/public/cpp/network_param_mojom_traits.h
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/services/network/public/mojom/BUILD.gn
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/services/network/public/mojom/network_param.mojom
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/services/network/public/mojom/websocket.mojom
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/services/network/websocket.cc
[modify] https://crrev.com/36c949511c8c72f5ad3b7d47d3c597b899976b17/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter

Project Member

Comment 57 by bugdroid1@chromium.org, Jun 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/70fa25917279b62dfbd313489984be81df7e6278

commit 70fa25917279b62dfbd313489984be81df7e6278
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Wed Jun 06 05:26:54 2018

[Network Service] Support OnAuthRequired WebRequest API for WebSocket

This CL makes OnAuthRequired work with WebSocket when the network
service is enabled.

Design Doc: https://docs.google.com/document/d/1L85aXX-m5NaV-g223lH7kKB2HPg6kMi1cjrDVeEptE8/edit

Bug:  721400 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I7587ea7937f3e283096a10a70d5d18b1a67d2650
Reviewed-on: https://chromium-review.googlesource.com/1009266
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564795}
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/content/browser/dedicated_worker/dedicated_worker_host.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/content/browser/renderer_interface_binders.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/content/browser/websockets/websocket_manager.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/content/browser/websockets/websocket_manager.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/content/browser/websockets/websocket_manager_unittest.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/content/public/browser/content_browser_client.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/content/public/browser/content_browser_client.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/extensions/browser/api/web_request/web_request_api.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/extensions/browser/api/web_request/web_request_api.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/extensions/browser/api/web_request/web_request_proxying_websocket.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/extensions/browser/api/web_request/web_request_proxying_websocket.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_channel.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_channel.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_channel_test.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_end_to_end_test.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_event_interface.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_handshake_stream_create_helper_test.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_stream.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_stream.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_stream_create_test_base.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_stream_create_test_base.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_stream_test.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_test_util.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/net/websockets/websocket_test_util.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/network_context.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/network_context.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/public/cpp/network_param.typemap
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/public/mojom/network_context.mojom
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/public/mojom/network_param.mojom
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/public/mojom/websocket.mojom
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/test/test_network_context.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/websocket.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/websocket.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/websocket_factory.cc
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/services/network/websocket_factory.h
[modify] https://crrev.com/70fa25917279b62dfbd313489984be81df7e6278/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter

Project Member

Comment 58 by bugdroid1@chromium.org, Jun 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a4ddce80177a7a8509cf01bc729ae0a2b4588af

commit 5a4ddce80177a7a8509cf01bc729ae0a2b4588af
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Wed Jun 06 07:37:46 2018

[Network Service] Support WebRequest API for WebSocket on dedicated workers.

Bug:  721400 
Change-Id: I033be720b2b1deb69ddb70cdd25a76087935423f
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/1084809
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564816}
[modify] https://crrev.com/5a4ddce80177a7a8509cf01bc729ae0a2b4588af/chrome/browser/extensions/api/web_request/web_request_apitest.cc
[modify] https://crrev.com/5a4ddce80177a7a8509cf01bc729ae0a2b4588af/chrome/test/data/extensions/api_test/webrequest/test_websocket.js
[add] https://crrev.com/5a4ddce80177a7a8509cf01bc729ae0a2b4588af/chrome/test/data/extensions/api_test/webrequest/test_websocket_worker.html
[add] https://crrev.com/5a4ddce80177a7a8509cf01bc729ae0a2b4588af/chrome/test/data/extensions/api_test/webrequest/test_websocket_worker_main.js
[add] https://crrev.com/5a4ddce80177a7a8509cf01bc729ae0a2b4588af/chrome/test/data/extensions/api_test/webrequest/websocket_worker.js
[modify] https://crrev.com/5a4ddce80177a7a8509cf01bc729ae0a2b4588af/content/browser/dedicated_worker/dedicated_worker_host.cc

Status: Fixed (was: Assigned)
Project Member

Comment 60 by bugdroid1@chromium.org, Jul 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/273532f9380c4eb5184f518024fd76eed489cbb6

commit 273532f9380c4eb5184f518024fd76eed489cbb6
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Fri Jul 20 03:46:18 2018

Allow extensions to modify WebSocket cookie headers with Network Service

Based on UMA data, it's fairly common for extensions to modify WebSocket
cookie headers. Support this in the network service.

Only adding cookie headers is supported. Extensions don't see cookie
headers that would be sent to the network. Extensions cannot express
an intent not to attach cookies.

Bug:  721400 
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I462735930f63a8d45cc66604888bae2e71e6345f
Reviewed-on: https://chromium-review.googlesource.com/1143088
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576770}
[modify] https://crrev.com/273532f9380c4eb5184f518024fd76eed489cbb6/services/network/websocket.cc

Sign in to add a comment