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

@ -67,7 +67,7 @@ void BadgeManager::BindServiceWorkerReceiver(
std::move(context));
}
std::string BadgeManager::GetBadgeString(absl::optional<int> badge_content) {
std::string BadgeManager::GetBadgeString(std::optional<int> badge_content) {
if (!badge_content)
return "";
@ -87,9 +87,9 @@ void BadgeManager::SetBadge(blink::mojom::BadgeValuePtr mojo_value) {
return;
}
absl::optional<int> value =
mojo_value->is_flag() ? absl::nullopt
: absl::make_optional(mojo_value->get_number());
std::optional<int> value = mojo_value->is_flag()
? std::nullopt
: std::make_optional(mojo_value->get_number());
electron::Browser::Get()->SetBadgeCount(value);
}