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

chore: replace absl::optional<T> with std::optional<T> (#40928)
This commit is contained in:
Milan Burda
2024-01-24 03:43:22 +01:00
committed by GitHub
parent 95e3df589f
commit 0df4312ded
129 changed files with 413 additions and 394 deletions

View File

@@ -239,7 +239,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)
@@ -312,7 +312,7 @@ absl::optional<int> ElectronMainDelegate::BasicStartupComplete() {
::switches::kDisableGpuMemoryBufferCompositorResources);
#endif
return absl::nullopt;
return std::nullopt;
}
void ElectronMainDelegate::PreSandboxStartup() {
@@ -399,7 +399,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.
@@ -409,7 +409,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;