| Index: chrome/app/chrome_main.cc
|
| diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
|
| index aec129c9bd1b72991d0c4e482c2c41e3e91b47e5..9d09439d1bf317564c813df2a1a64e700f51c3dd 100644
|
| --- a/chrome/app/chrome_main.cc
|
| +++ b/chrome/app/chrome_main.cc
|
| @@ -15,6 +15,10 @@
|
| #include "headless/public/headless_shell.h"
|
| #include "ui/gfx/switches.h"
|
|
|
| +#if BUILDFLAG(ENABLE_OOP_HEAP_PROFILING)
|
| +#include "chrome/profiling/profiling_main.h"
|
| +#endif
|
| +
|
| #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
|
| #include "services/service_manager/runner/common/client_util.h"
|
| #endif
|
| @@ -92,6 +96,7 @@ int ChromeMain(int argc, const char** argv) {
|
| const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess());
|
| ALLOW_UNUSED_LOCAL(command_line);
|
|
|
| + // Chrome-specific process modes.
|
| #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
|
| if (command_line->HasSwitch(switches::kHeadless)) {
|
| #if defined(OS_MACOSX)
|
| @@ -101,6 +106,13 @@ int ChromeMain(int argc, const char** argv) {
|
| }
|
| #endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
|
|
|
| +#if BUILDFLAG(ENABLE_OOP_HEAP_PROFILING)
|
| + if (command_line->GetSwitchValueASCII(switches::kProcessType) ==
|
| + "profiling") {
|
| + return profiling::ProfilingMain(*command_line);
|
| + }
|
| +#endif // ENABLE_OOP_HEAP_PROFILING
|
| +
|
| #if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
|
| if (service_manager::ServiceManagerIsRemote())
|
| params.env_mode = aura::Env::Mode::MUS;
|
|
|