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
129 changed files with 419 additions and 397 deletions

View File

@@ -238,7 +238,7 @@ const char* const ElectronMainDelegate::kNonWildcardDomainNonPortSchemes[] = {
const size_t ElectronMainDelegate::kNonWildcardDomainNonPortSchemesSize =
std::size(kNonWildcardDomainNonPortSchemes);
absl::optional<int> ElectronMainDelegate::BasicStartupComplete() {
std::optional<int> ElectronMainDelegate::BasicStartupComplete() {
auto* command_line = base::CommandLine::ForCurrentProcess();
#if BUILDFLAG(IS_WIN)
@@ -311,7 +311,7 @@ absl::optional<int> ElectronMainDelegate::BasicStartupComplete() {
::switches::kDisableGpuMemoryBufferCompositorResources);
#endif
return absl::nullopt;
return std::nullopt;
}
void ElectronMainDelegate::PreSandboxStartup() {
@@ -398,7 +398,7 @@ void ElectronMainDelegate::SandboxInitialized(const std::string& process_type) {
#endif
}
absl::optional<int> ElectronMainDelegate::PreBrowserMain() {
std::optional<int> ElectronMainDelegate::PreBrowserMain() {
// This is initialized early because the service manager reads some feature
// flags and we need to make sure the feature list is initialized before the
// service manager reads the features.
@@ -408,7 +408,7 @@ absl::optional<int> ElectronMainDelegate::PreBrowserMain() {
#if BUILDFLAG(IS_MAC)
RegisterAtomCrApp();
#endif
return absl::nullopt;
return std::nullopt;
}
base::StringPiece ElectronMainDelegate::GetBrowserV8SnapshotFilename() {

View File

@@ -34,10 +34,10 @@ class ElectronMainDelegate : public content::ContentMainDelegate {
protected:
// content::ContentMainDelegate:
absl::optional<int> BasicStartupComplete() override;
std::optional<int> BasicStartupComplete() override;
void PreSandboxStartup() override;
void SandboxInitialized(const std::string& process_type) override;
absl::optional<int> PreBrowserMain() override;
std::optional<int> PreBrowserMain() override;
content::ContentClient* CreateContentClient() override;
content::ContentBrowserClient* CreateContentBrowserClient() override;
content::ContentGpuClient* CreateContentGpuClient() override;