chore: bump chromium to 104.0.5073.0 (main) (#34272)
This commit is contained in:
parent
3849d19e14
commit
470396d6ac
112 changed files with 663 additions and 589 deletions
|
@ -269,9 +269,7 @@ class AsarURLLoader : public network::mojom::URLLoader {
|
|||
head->headers->AddHeader(net::HttpRequestHeaders::kContentType,
|
||||
head->mime_type.c_str());
|
||||
}
|
||||
client_->OnReceiveResponse(std::move(head),
|
||||
mojo::ScopedDataPipeConsumerHandle());
|
||||
client_->OnStartLoadingResponseBody(std::move(consumer_handle));
|
||||
client_->OnReceiveResponse(std::move(head), std::move(consumer_handle));
|
||||
|
||||
if (total_bytes_to_send == 0) {
|
||||
// There's definitely no more data, so we're already done.
|
||||
|
|
|
@ -554,13 +554,6 @@ void ElectronURLLoaderFactory::StartLoadingStream(
|
|||
} else if (stream->IsNullOrUndefined()) {
|
||||
mojo::Remote<network::mojom::URLLoaderClient> client_remote(
|
||||
std::move(client));
|
||||
// "data" was explicitly passed as null or undefined, assume the user wants
|
||||
// to send an empty body.
|
||||
//
|
||||
// Note that We must submit a empty body otherwise NetworkService would
|
||||
// crash.
|
||||
client_remote->OnReceiveResponse(std::move(head),
|
||||
mojo::ScopedDataPipeConsumerHandle());
|
||||
mojo::ScopedDataPipeProducerHandle producer;
|
||||
mojo::ScopedDataPipeConsumerHandle consumer;
|
||||
if (mojo::CreateDataPipe(nullptr, producer, consumer) != MOJO_RESULT_OK) {
|
||||
|
@ -568,8 +561,13 @@ void ElectronURLLoaderFactory::StartLoadingStream(
|
|||
network::URLLoaderCompletionStatus(net::ERR_INSUFFICIENT_RESOURCES));
|
||||
return;
|
||||
}
|
||||
// "data" was explicitly passed as null or undefined, assume the user wants
|
||||
// to send an empty body.
|
||||
//
|
||||
// Note that We must submit a empty body otherwise NetworkService would
|
||||
// crash.
|
||||
client_remote->OnReceiveResponse(std::move(head), std::move(consumer));
|
||||
producer.reset(); // The data pipe is empty.
|
||||
client_remote->OnStartLoadingResponseBody(std::move(consumer));
|
||||
client_remote->OnComplete(network::URLLoaderCompletionStatus(net::OK));
|
||||
return;
|
||||
} else if (!stream->IsObject()) {
|
||||
|
@ -605,8 +603,6 @@ void ElectronURLLoaderFactory::SendContents(
|
|||
|
||||
// Add header to ignore CORS.
|
||||
head->headers->AddHeader("Access-Control-Allow-Origin", "*");
|
||||
client_remote->OnReceiveResponse(std::move(head),
|
||||
mojo::ScopedDataPipeConsumerHandle());
|
||||
|
||||
// Code below follows the pattern of data_url_loader_factory.cc.
|
||||
mojo::ScopedDataPipeProducerHandle producer;
|
||||
|
@ -617,7 +613,7 @@ void ElectronURLLoaderFactory::SendContents(
|
|||
return;
|
||||
}
|
||||
|
||||
client_remote->OnStartLoadingResponseBody(std::move(consumer));
|
||||
client_remote->OnReceiveResponse(std::move(head), std::move(consumer));
|
||||
|
||||
auto write_data = std::make_unique<WriteData>();
|
||||
write_data->client = std::move(client_remote);
|
||||
|
|
|
@ -58,9 +58,7 @@ void NodeStreamLoader::Start(network::mojom::URLResponseHeadPtr head) {
|
|||
}
|
||||
|
||||
producer_ = std::make_unique<mojo::DataPipeProducer>(std::move(producer));
|
||||
client_->OnReceiveResponse(std::move(head),
|
||||
mojo::ScopedDataPipeConsumerHandle());
|
||||
client_->OnStartLoadingResponseBody(std::move(consumer));
|
||||
client_->OnReceiveResponse(std::move(head), std::move(consumer));
|
||||
|
||||
auto weak = weak_factory_.GetWeakPtr();
|
||||
On("end",
|
||||
|
|
|
@ -300,11 +300,6 @@ void ProxyingURLLoaderFactory::InProgressRequest::OnTransferSizeUpdated(
|
|||
target_client_->OnTransferSizeUpdated(transfer_size_diff);
|
||||
}
|
||||
|
||||
void ProxyingURLLoaderFactory::InProgressRequest::OnStartLoadingResponseBody(
|
||||
mojo::ScopedDataPipeConsumerHandle body) {
|
||||
target_client_->OnStartLoadingResponseBody(std::move(body));
|
||||
}
|
||||
|
||||
void ProxyingURLLoaderFactory::InProgressRequest::OnComplete(
|
||||
const network::URLLoaderCompletionStatus& status) {
|
||||
if (status.error_code != net::OK) {
|
||||
|
|
|
@ -97,8 +97,6 @@ class ProxyingURLLoaderFactory
|
|||
OnUploadProgressCallback callback) override;
|
||||
void OnReceiveCachedMetadata(mojo_base::BigBuffer data) override;
|
||||
void OnTransferSizeUpdated(int32_t transfer_size_diff) override;
|
||||
void OnStartLoadingResponseBody(
|
||||
mojo::ScopedDataPipeConsumerHandle body) override;
|
||||
void OnComplete(const network::URLLoaderCompletionStatus& status) override;
|
||||
|
||||
void OnLoaderCreated(
|
||||
|
|
|
@ -70,9 +70,7 @@ void URLPipeLoader::OnResponseStarted(
|
|||
|
||||
producer_ = std::make_unique<mojo::DataPipeProducer>(std::move(producer));
|
||||
|
||||
client_->OnReceiveResponse(response_head.Clone(),
|
||||
mojo::ScopedDataPipeConsumerHandle());
|
||||
client_->OnStartLoadingResponseBody(std::move(consumer));
|
||||
client_->OnReceiveResponse(response_head.Clone(), std::move(consumer));
|
||||
}
|
||||
|
||||
void URLPipeLoader::OnWrite(base::OnceClosure resume, MojoResult result) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue