Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "chrome/app/chrome_main_delegate.h" | 10 #include "chrome/app/chrome_main_delegate.h" |
| 11 #include "chrome/common/chrome_switches.h" | |
| 11 #include "chrome/common/features.h" | 12 #include "chrome/common/features.h" |
| 12 #include "content/public/app/content_main.h" | 13 #include "content/public/app/content_main.h" |
| 13 #include "content/public/common/content_switches.h" | 14 #include "content/public/common/content_switches.h" |
| 14 #include "headless/public/headless_shell.h" | 15 #include "headless/public/headless_shell.h" |
| 15 #include "ui/gfx/switches.h" | 16 #include "ui/gfx/switches.h" |
| 16 | 17 |
| 17 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 18 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
| 18 #include "chrome/app/mash/mash_runner.h" | 19 #include "chrome/app/mash/mash_runner.h" |
| 19 #include "chrome/common/channel_info.h" | 20 #include "chrome/common/channel_info.h" |
| 20 #include "components/version_info/version_info.h" | 21 #include "components/version_info/version_info.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 | 95 |
| 95 #if defined(OS_LINUX) | 96 #if defined(OS_LINUX) |
| 96 if (command_line->HasSwitch(switches::kHeadless)) | 97 if (command_line->HasSwitch(switches::kHeadless)) |
| 97 return headless::HeadlessShellMain(argc, argv); | 98 return headless::HeadlessShellMain(argc, argv); |
| 98 #endif // defined(OS_LINUX) | 99 #endif // defined(OS_LINUX) |
| 99 | 100 |
| 100 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 101 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
| 101 version_info::Channel channel = chrome::GetChannel(); | 102 version_info::Channel channel = chrome::GetChannel(); |
| 102 if (channel == version_info::Channel::CANARY || | 103 if (channel == version_info::Channel::CANARY || |
| 103 channel == version_info::Channel::UNKNOWN) { | 104 channel == version_info::Channel::UNKNOWN) { |
| 104 if (command_line->HasSwitch("mash")) | 105 if (command_line->HasSwitch(switches::kMash)) |
|
James Cook
2017/02/07 22:07:44
Can you fix mash_runner.cc also?
mfomitchev
2017/02/08 19:02:13
Done.
| |
| 105 return MashMain(); | 106 return MashMain(); |
| 106 WaitForMashDebuggerIfNecessary(); | 107 WaitForMashDebuggerIfNecessary(); |
| 107 if (service_manager::ServiceManagerIsRemote()) | 108 if (service_manager::ServiceManagerIsRemote()) |
| 108 params.env_mode = aura::Env::Mode::MUS; | 109 params.env_mode = aura::Env::Mode::MUS; |
| 109 } | 110 } |
| 110 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 111 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
| 111 | 112 |
| 112 int rv = content::ContentMain(params); | 113 int rv = content::ContentMain(params); |
| 113 | 114 |
| 114 #if defined(OS_WIN) | 115 #if defined(OS_WIN) |
| 115 base::win::SetShouldCrashOnProcessDetach(false); | 116 base::win::SetShouldCrashOnProcessDetach(false); |
| 116 #endif | 117 #endif |
| 117 | 118 |
| 118 return rv; | 119 return rv; |
| 119 } | 120 } |
| OLD | NEW |