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

Side by Side Diff: chrome/app/chrome_main.cc

Issue 2835603002: Revert of Add --headless flag to Windows (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « chrome/BUILD.gn ('k') | headless/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/app/chrome_main_delegate.h" 10 #include "chrome/app/chrome_main_delegate.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 CHECK(DumpProcess); 82 CHECK(DumpProcess);
83 base::debug::SetDumpWithoutCrashingFunction(DumpProcess); 83 base::debug::SetDumpWithoutCrashingFunction(DumpProcess);
84 84
85 // Verify that chrome_elf and this module (chrome.dll and chrome_child.dll) 85 // Verify that chrome_elf and this module (chrome.dll and chrome_child.dll)
86 // have the same version. 86 // have the same version.
87 if (install_static::InstallDetails::Get().VersionMismatch()) 87 if (install_static::InstallDetails::Get().VersionMismatch())
88 base::debug::DumpWithoutCrashing(); 88 base::debug::DumpWithoutCrashing();
89 #else 89 #else
90 params.argc = argc; 90 params.argc = argc;
91 params.argv = argv; 91 params.argv = argv;
92 #endif
93
94 #if !defined(OS_WIN)
92 base::CommandLine::Init(params.argc, params.argv); 95 base::CommandLine::Init(params.argc, params.argv);
93 #endif // defined(OS_WIN)
94 base::CommandLine::Init(0, nullptr);
95 const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess()); 96 const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess());
96 ALLOW_UNUSED_LOCAL(command_line); 97 ALLOW_UNUSED_LOCAL(command_line);
98 #endif
97 99
98 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) 100 #if defined(OS_LINUX) || defined(OS_MACOSX)
99 if (command_line->HasSwitch(switches::kHeadless)) { 101 if (command_line->HasSwitch(switches::kHeadless)) {
100 #if defined(OS_MACOSX) 102 #if defined(OS_MACOSX)
101 SetUpBundleOverrides(); 103 SetUpBundleOverrides();
102 #endif 104 #endif
103 return headless::HeadlessShellMain(params); 105 return headless::HeadlessShellMain(argc, argv);
104 } 106 }
105 #endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) 107 #endif // defined(OS_LINUX) || defined(OS_MACOSX)
106 108
107 #if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) 109 #if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
108 version_info::Channel channel = chrome::GetChannel(); 110 version_info::Channel channel = chrome::GetChannel();
109 if (channel == version_info::Channel::CANARY || 111 if (channel == version_info::Channel::CANARY ||
110 channel == version_info::Channel::UNKNOWN) { 112 channel == version_info::Channel::UNKNOWN) {
111 if (command_line->HasSwitch(switches::kMash) || 113 if (command_line->HasSwitch(switches::kMash) ||
112 command_line->HasSwitch(switches::kMus)) { 114 command_line->HasSwitch(switches::kMus)) {
113 return MashMain(); 115 return MashMain();
114 } 116 }
115 WaitForMashDebuggerIfNecessary(); 117 WaitForMashDebuggerIfNecessary();
116 if (service_manager::ServiceManagerIsRemote()) 118 if (service_manager::ServiceManagerIsRemote())
117 params.env_mode = aura::Env::Mode::MUS; 119 params.env_mode = aura::Env::Mode::MUS;
118 } 120 }
119 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) 121 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
120 122
121 int rv = content::ContentMain(params); 123 int rv = content::ContentMain(params);
122 124
123 #if defined(OS_WIN) 125 #if defined(OS_WIN)
124 base::win::SetShouldCrashOnProcessDetach(false); 126 base::win::SetShouldCrashOnProcessDetach(false);
125 #endif 127 #endif
126 128
127 return rv; 129 return rv;
128 } 130 }
OLDNEW
« 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