Browse Source

6368856: Migrate absl variant.h and utility.h in content (part 2/2) | https://chromium-review.googlesource.com/c/chromium/src/+/6368856

alice 1 month ago
parent
commit
512907fda6
2 changed files with 3 additions and 4 deletions
  1. 2 3
      shell/app/electron_main_delegate.cc
  2. 1 1
      shell/app/electron_main_delegate.h

+ 2 - 3
shell/app/electron_main_delegate.cc

@@ -455,8 +455,7 @@ ElectronMainDelegate::CreateContentUtilityClient() {
   return utility_client_.get();
 }
 
-absl::variant<int, content::MainFunctionParams>
-ElectronMainDelegate::RunProcess(
+std::variant<int, content::MainFunctionParams> ElectronMainDelegate::RunProcess(
     const std::string& process_type,
     content::MainFunctionParams main_function_params) {
   if (process_type == kRelauncherProcess)
@@ -466,7 +465,7 @@ ElectronMainDelegate::RunProcess(
 }
 
 bool ElectronMainDelegate::ShouldCreateFeatureList(InvokedIn invoked_in) {
-  return absl::holds_alternative<InvokedInChildProcess>(invoked_in);
+  return std::holds_alternative<InvokedInChildProcess>(invoked_in);
 }
 
 bool ElectronMainDelegate::ShouldInitializeMojo(InvokedIn invoked_in) {

+ 1 - 1
shell/app/electron_main_delegate.h

@@ -52,7 +52,7 @@ class ElectronMainDelegate : public content::ContentMainDelegate {
   content::ContentGpuClient* CreateContentGpuClient() override;
   content::ContentRendererClient* CreateContentRendererClient() override;
   content::ContentUtilityClient* CreateContentUtilityClient() override;
-  absl::variant<int, content::MainFunctionParams> RunProcess(
+  std::variant<int, content::MainFunctionParams> RunProcess(
       const std::string& process_type,
       content::MainFunctionParams main_function_params) override;
   bool ShouldCreateFeatureList(InvokedIn invoked_in) override;