mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
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:
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user