Index: chrome/app/chrome_main.cc |
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc |
index 6585c78e7ac88b8e221886d97f06857e52167fb9..aec129c9bd1b72991d0c4e482c2c41e3e91b47e5 100644 |
--- a/chrome/app/chrome_main.cc |
+++ b/chrome/app/chrome_main.cc |
@@ -86,22 +86,20 @@ int ChromeMain(int argc, const char** argv) { |
#else |
params.argc = argc; |
params.argv = argv; |
-#endif |
- |
-#if !defined(OS_WIN) |
base::CommandLine::Init(params.argc, params.argv); |
+#endif // defined(OS_WIN) |
+ base::CommandLine::Init(0, nullptr); |
const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess()); |
ALLOW_UNUSED_LOCAL(command_line); |
-#endif |
-#if defined(OS_LINUX) || defined(OS_MACOSX) |
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) |
if (command_line->HasSwitch(switches::kHeadless)) { |
#if defined(OS_MACOSX) |
SetUpBundleOverrides(); |
#endif |
- return headless::HeadlessShellMain(argc, argv); |
+ return headless::HeadlessShellMain(params); |
} |
-#endif // defined(OS_LINUX) || defined(OS_MACOSX) |
+#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) |
#if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
if (service_manager::ServiceManagerIsRemote()) |