| 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);
|
|
|
|
|