refactor: CreateDataPipe deprecated form was removed

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2698090
This commit is contained in:
Samuel Attard 2021-03-05 16:42:15 -08:00
parent be627568b2
commit 77ad17b383
3 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;