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

Unified Diff: chrome/app/chrome_main.cc

Issue 2941823002: Add flags and skeleton for profiling process. (Closed)
Patch Set: Fix header checking Created 3 years, 6 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
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;
« no previous file with comments | « chrome/app/DEPS ('k') | chrome/common/BUILD.gn » ('j') | chrome/profiling/README.md » ('J')

Powered by Google App Engine
This is Rietveld 408576698