Index: chrome/app/chrome_main.cc |
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc |
index 041ecc4004fbd2bbf897e54caf80ef1e55da43f4..0ad602abf0cfccd9dab0605d129817b9bf2dbc9a 100644 |
--- a/chrome/app/chrome_main.cc |
+++ b/chrome/app/chrome_main.cc |
@@ -5,8 +5,14 @@ |
#include "chrome/app/chrome_main_delegate.h" |
#include "build/build_config.h" |
+#include "chrome/common/features.h" |
#include "content/public/app/content_main.h" |
+#if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
+#include "base/command_line.h" |
+#include "chrome/app/mash/mash_runner.h" |
+#endif |
+ |
#if defined(OS_WIN) |
#include "base/debug/dump_without_crashing.h" |
#include "base/win/win_util.h" |
@@ -64,6 +70,17 @@ int ChromeMain(int argc, const char** argv) { |
params.argv = argv; |
#endif |
+#if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
+#if !defined(OS_WIN) |
+ base::CommandLine::Init(params.argc, params.argv); |
+#endif |
+ const base::CommandLine& command_line = |
+ *base::CommandLine::ForCurrentProcess(); |
+ // TODO(sky): only do this for dev builds and if on canary channel. |
+ if (command_line.HasSwitch("mash")) |
+ return MashMain(); |
+#endif |
+ |
int rv = content::ContentMain(params); |
#if defined(OS_WIN) |