Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3935)

Unified Diff: chrome/app/chrome_main.cc

Issue 2762593002: Add --headless flag to Windows (Closed)
Patch Set: added TODO Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/BUILD.gn ('k') | headless/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « chrome/BUILD.gn ('k') | headless/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698