| Index: chrome/app/chrome_main.cc
|
| diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
|
| index aec129c9bd1b72991d0c4e482c2c41e3e91b47e5..912469dbe5435b735c6fbe86a47c82f5e3ad75e4 100644
|
| --- a/chrome/app/chrome_main.cc
|
| +++ b/chrome/app/chrome_main.cc
|
| @@ -10,6 +10,7 @@
|
| #include "chrome/app/chrome_main_delegate.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/features.h"
|
| +#include "chrome/profiling/profiling_main.h"
|
| #include "content/public/app/content_main.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "headless/public/headless_shell.h"
|
| @@ -92,6 +93,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 +103,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;
|
|
|