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:
parent
fac964ac0d
commit
892c9d78a3
129 changed files with 419 additions and 397 deletions
|
@ -49,7 +49,7 @@ bool LaunchXdgUtility(const std::vector<std::string>& argv, int* exit_code) {
|
|||
return process.WaitForExit(exit_code);
|
||||
}
|
||||
|
||||
absl::optional<std::string> GetXdgAppOutput(
|
||||
std::optional<std::string> GetXdgAppOutput(
|
||||
const std::vector<std::string>& argv) {
|
||||
std::string reply;
|
||||
int success_code;
|
||||
|
@ -58,9 +58,9 @@ absl::optional<std::string> GetXdgAppOutput(
|
|||
&success_code);
|
||||
|
||||
if (!ran_ok || success_code != EXIT_SUCCESS)
|
||||
return absl::optional<std::string>();
|
||||
return std::optional<std::string>();
|
||||
|
||||
return absl::make_optional(reply);
|
||||
return std::make_optional(reply);
|
||||
}
|
||||
|
||||
bool SetDefaultWebClient(const std::string& protocol) {
|
||||
|
@ -126,7 +126,7 @@ std::u16string Browser::GetApplicationNameForProtocol(const GURL& url) {
|
|||
return base::ASCIIToUTF16(GetXdgAppOutput(argv).value_or(std::string()));
|
||||
}
|
||||
|
||||
bool Browser::SetBadgeCount(absl::optional<int> count) {
|
||||
bool Browser::SetBadgeCount(std::optional<int> count) {
|
||||
if (IsUnityRunning() && count.has_value()) {
|
||||
unity::SetDownloadCount(count.value());
|
||||
badge_count_ = count.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue