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

Unified Diff: chrome/app/chrome_main.cc

Issue 1722743002: Adds ability for chrome to behave as mojo_runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to tip of tree Created 4 years, 10 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 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)
« no previous file with comments | « chrome/app/DEPS ('k') | chrome/app/mash/BUILD.gn » ('j') | chrome/common/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698