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

@ -52,7 +52,7 @@ void LoginHandler::EmitEvent(
api::WebContents* api_web_contents = api::WebContents::From(web_contents());
if (!api_web_contents) {
std::move(auth_required_callback_).Run(absl::nullopt);
std::move(auth_required_callback_).Run(std::nullopt);
return;
}
@ -75,7 +75,7 @@ void LoginHandler::EmitEvent(
// deleted. Check the weak ptr before accessing any member variables to
// prevent UAF.
if (weak_this && !default_prevented && auth_required_callback_) {
std::move(auth_required_callback_).Run(absl::nullopt);
std::move(auth_required_callback_).Run(std::nullopt);
}
}
@ -85,7 +85,7 @@ void LoginHandler::CallbackFromJS(gin::Arguments* args) {
if (auth_required_callback_) {
std::u16string username, password;
if (!args->GetNext(&username) || !args->GetNext(&password)) {
std::move(auth_required_callback_).Run(absl::nullopt);
std::move(auth_required_callback_).Run(std::nullopt);
return;
}
std::move(auth_required_callback_)