From 77ad17b38357e240b1eade74b13703b41030f978 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 5 Mar 2021 16:42:15 -0800 Subject: [PATCH] refactor: CreateDataPipe deprecated form was removed Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2698090 --- shell/browser/net/electron_url_loader_factory.cc | 4 ++-- shell/browser/net/node_stream_loader.cc | 2 +- shell/browser/net/url_pipe_loader.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/browser/net/electron_url_loader_factory.cc b/shell/browser/net/electron_url_loader_factory.cc index 6944e0da67..2f670eeb59 100644 --- a/shell/browser/net/electron_url_loader_factory.cc +++ b/shell/browser/net/electron_url_loader_factory.cc @@ -501,7 +501,7 @@ void ElectronURLLoaderFactory::StartLoadingStream( client_remote->OnReceiveResponse(std::move(head)); mojo::ScopedDataPipeProducerHandle producer; mojo::ScopedDataPipeConsumerHandle consumer; - if (mojo::CreateDataPipe(nullptr, &producer, &consumer) != MOJO_RESULT_OK) { + if (mojo::CreateDataPipe(nullptr, producer, consumer) != MOJO_RESULT_OK) { client_remote->OnComplete( network::URLLoaderCompletionStatus(net::ERR_INSUFFICIENT_RESOURCES)); return; @@ -548,7 +548,7 @@ void ElectronURLLoaderFactory::SendContents( // Code bellow follows the pattern of data_url_loader_factory.cc. mojo::ScopedDataPipeProducerHandle producer; mojo::ScopedDataPipeConsumerHandle consumer; - if (mojo::CreateDataPipe(nullptr, &producer, &consumer) != MOJO_RESULT_OK) { + if (mojo::CreateDataPipe(nullptr, producer, consumer) != MOJO_RESULT_OK) { client_remote->OnComplete( network::URLLoaderCompletionStatus(net::ERR_INSUFFICIENT_RESOURCES)); return; diff --git a/shell/browser/net/node_stream_loader.cc b/shell/browser/net/node_stream_loader.cc index a692549463..423216a4db 100644 --- a/shell/browser/net/node_stream_loader.cc +++ b/shell/browser/net/node_stream_loader.cc @@ -52,7 +52,7 @@ NodeStreamLoader::~NodeStreamLoader() { void NodeStreamLoader::Start(network::mojom::URLResponseHeadPtr head) { mojo::ScopedDataPipeProducerHandle producer; mojo::ScopedDataPipeConsumerHandle consumer; - MojoResult rv = mojo::CreateDataPipe(nullptr, &producer, &consumer); + MojoResult rv = mojo::CreateDataPipe(nullptr, producer, consumer); if (rv != MOJO_RESULT_OK) { NotifyComplete(net::ERR_INSUFFICIENT_RESOURCES); return; diff --git a/shell/browser/net/url_pipe_loader.cc b/shell/browser/net/url_pipe_loader.cc index a290478f4a..39a4152e64 100644 --- a/shell/browser/net/url_pipe_loader.cc +++ b/shell/browser/net/url_pipe_loader.cc @@ -61,7 +61,7 @@ void URLPipeLoader::OnResponseStarted( const network::mojom::URLResponseHead& response_head) { mojo::ScopedDataPipeProducerHandle producer; mojo::ScopedDataPipeConsumerHandle consumer; - MojoResult rv = mojo::CreateDataPipe(nullptr, &producer, &consumer); + MojoResult rv = mojo::CreateDataPipe(nullptr, producer, consumer); if (rv != MOJO_RESULT_OK) { NotifyComplete(net::ERR_INSUFFICIENT_RESOURCES); return;