mojo::NullRemote(), std::move(throttling_profile_id),Anatoli HancharouSince you really want to influence this NullRemote being passed in here. I really suggest changing ContentBrowserClient::GetWebSocketOptions to return the trusted header mojo remote along side with the options value. That would be much cleaner.
You'd likely need to some some magic inside the extension intercepting the WebSocket anyways, but I'm not sure you want to provide the header in that case or not.
Great catch!
I refactored the code to use header client wrapper that allows injecting 'HeaderInjectionClient' into extensions interceptor and registering it after `WebRequestProxyingWebSocket` to ensure precedence
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::move(handshake_client), std::move(header_client_wrapper));If WebSocketOptions is passed in here, you very well can define your own base::OnceCallback inside Extensions (as opposed to the content layer) that lets you create you intermediate trusted header injector...
WebSocketHeaderClientWrapper header_client_wrapper);Can we pass WebSocketOptions here instead?
WebSocketHeaderClientWrapper header_client_wrapper;I'd prefer if this wasn't a callback, just allocate the PendingRemove here as a member.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |