Chromium Code Reviews| Index: content/utility/utility_main.cc |
| diff --git a/content/utility/utility_main.cc b/content/utility/utility_main.cc |
| index e8acf88ea2b5f98385506762b5ee2662e6a205c0..a2f8a3812a9ebe0346cd1a594598b7cc574bf5d1 100644 |
| --- a/content/utility/utility_main.cc |
| +++ b/content/utility/utility_main.cc |
| @@ -13,6 +13,7 @@ |
| #include "content/common/sandbox_linux/sandbox_linux.h" |
| #include "content/public/common/content_switches.h" |
| #include "content/public/common/main_function_params.h" |
| +#include "content/public/common/mojo_channel_switches.h" |
| #include "content/public/common/sandbox_init.h" |
| #include "content/utility/utility_thread_impl.h" |
| @@ -40,7 +41,16 @@ int UtilityMain(const MainFunctionParams& parameters) { |
| ChildProcess utility_process; |
| utility_process.set_main_thread(new UtilityThreadImpl()); |
| - base::HighResolutionTimerManager hi_res_timer_manager; |
| + // TODO(leonhsl): Both utility process and service utility process would come |
| + // here, but the later is launched without connection to service manager. |
| + // However, service manager connection is necessary for instantiation of the |
| + // process-wide base::PowerMonitor, which is further necessary to |
| + // base::HighResolutionTimerManager. So in case of service utility process, we |
| + // disable base::HighResolutionTimerManager for now, until we resolved |
| + // http://crbug.com/646833. |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kServiceRequestChannelToken)) |
|
Vitaly Buka (NO REVIEWS)
2017/01/18 19:07:50
Please add {}
Vitaly Buka (NO REVIEWS)
2017/01/19 04:25:35
Probably you can just base::HighResolutionTimerMan
leonhsl(Using Gerrit)
2017/01/19 07:06:44
I suppose the comment above means that we can just
|
| + base::HighResolutionTimerManager hi_res_timer_manager; |
| #if defined(OS_WIN) |
| bool no_sandbox = parameters.command_line.HasSwitch(switches::kNoSandbox); |