chore: replace absl::optional<T> with std::optional<T> (#40928)

* chore: replace absl::optional<T> with std::optional<T>

* IWYU
This commit is contained in:
Milan Burda 2024-01-10 23:23:35 +01:00 committed by GitHub
parent fac964ac0d
commit 892c9d78a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
129 changed files with 419 additions and 397 deletions

View file

@ -211,7 +211,7 @@ void ElectronURLLoaderFactory::RedirectedRequest::FollowRedirect(
const std::vector<std::string>& removed_headers,
const net::HttpRequestHeaders& modified_headers,
const net::HttpRequestHeaders& modified_cors_exempt_headers,
const absl::optional<GURL>& new_url) {
const std::optional<GURL>& new_url) {
// Update |request_| with info from the redirect, so that it's accurate
// The following references code in WorkerScriptLoader::FollowRedirect
bool should_clear_upload = false;
@ -592,7 +592,7 @@ void ElectronURLLoaderFactory::StartLoadingStream(
// Note that We must submit a empty body otherwise NetworkService would
// crash.
client_remote->OnReceiveResponse(std::move(head), std::move(consumer),
absl::nullopt);
std::nullopt);
producer.reset(); // The data pipe is empty.
client_remote->OnComplete(network::URLLoaderCompletionStatus(net::OK));
return;
@ -640,7 +640,7 @@ void ElectronURLLoaderFactory::SendContents(
}
client_remote->OnReceiveResponse(std::move(head), std::move(consumer),
absl::nullopt);
std::nullopt);
auto write_data = std::make_unique<WriteData>();
write_data->client = std::move(client_remote);