diff --git a/browser/net/brave_proxying_web_socket.cc b/browser/net/brave_proxying_web_socket.cc index 26f02750aaf5..b793d34630b0 100644 --- a/browser/net/brave_proxying_web_socket.cc +++ b/browser/net/brave_proxying_web_socket.cc @@ -204,15 +204,16 @@ void BraveProxyingWebSocket::ContinueToHeadersReceived() { } void BraveProxyingWebSocket::OnConnectionEstablished( - network::mojom::WebSocketPtr websocket, + mojo::PendingRemote websocket, + mojo::PendingReceiver client_receiver, const std::string& selected_protocol, const std::string& extensions, - uint64_t receive_quota_threshold) { + mojo::ScopedDataPipeConsumerHandle readable) { DCHECK(forwarding_handshake_client_); DCHECK(!is_done_); forwarding_handshake_client_->OnConnectionEstablished( - std::move(websocket), selected_protocol, extensions, - receive_quota_threshold); + std::move(websocket), std::move(client_receiver), selected_protocol, + extensions, std::move(readable)); OnError(net::ERR_FAILED); } diff --git a/browser/net/brave_proxying_web_socket.h b/browser/net/brave_proxying_web_socket.h index d81125a474a5..a0f8bff0d93c 100644 --- a/browser/net/brave_proxying_web_socket.h +++ b/browser/net/brave_proxying_web_socket.h @@ -18,8 +18,8 @@ #include "brave/browser/net/resource_context_data.h" #include "brave/browser/net/url_context.h" #include "content/public/browser/content_browser_client.h" -#include "mojo/public/cpp/bindings/binding.h" #include "mojo/public/cpp/bindings/binding_set.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/resource_response.h" #include "services/network/public/mojom/network_context.mojom.h" @@ -73,10 +73,12 @@ class BraveProxyingWebSocket : public network::mojom::WebSocketHandshakeClient, network::mojom::WebSocketHandshakeRequestPtr request) override; void OnResponseReceived( network::mojom::WebSocketHandshakeResponsePtr response) override; - void OnConnectionEstablished(network::mojom::WebSocketPtr websocket, - const std::string& selected_protocol, - const std::string& extensions, - uint64_t receive_quota_threshold) override; + void OnConnectionEstablished( + mojo::PendingRemote websocket, + mojo::PendingReceiver client_receiver, + const std::string& selected_protocol, + const std::string& extensions, + mojo::ScopedDataPipeConsumerHandle readable) override; // network::mojom::AuthenticationHandler method: void OnAuthRequired(const net::AuthChallengeInfo& auth_info,