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

Unified Diff: chrome/app/chrome_main.cc

Issue 2359483003: chromeos: Add a flag to launch with --mash. (Closed)
Patch Set: . Created 4 years, 3 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
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main.cc
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index d84f8d43ae4be629b9adca43c7fb13d3c80d40d5..75211d869cc77a134f00f476390ac08b8ea989a2 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -11,6 +11,8 @@
#if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
#include "base/command_line.h"
#include "chrome/app/mash/mash_runner.h"
+#include "chrome/common/channel_info.h"
+#include "components/version_info/version_info.h"
#endif
#if defined(OS_WIN)
@@ -75,12 +77,16 @@ int ChromeMain(int argc, const char** argv) {
#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
+
+ version_info::Channel channel = chrome::GetChannel();
+ if (channel == version_info::Channel::CANARY ||
+ channel == version_info::Channel::UNKNOWN) {
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch("mash"))
+ return MashMain();
+ }
+#endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
int rv = content::ContentMain(params);
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698