| Index: remoting/host/win/worker_process_launcher.cc
|
| diff --git a/remoting/host/win/worker_process_launcher.cc b/remoting/host/win/worker_process_launcher.cc
|
| index e4bf86cd34650722b1379e60033f044a6a8b616b..c46f85d268eb60fe5072192b9ea8708ffc280247 100644
|
| --- a/remoting/host/win/worker_process_launcher.cc
|
| +++ b/remoting/host/win/worker_process_launcher.cc
|
| @@ -8,11 +8,13 @@
|
|
|
| #include "base/location.h"
|
| #include "base/logging.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/time/time.h"
|
| #include "ipc/ipc_message.h"
|
| #include "remoting/host/chromoting_messages.h"
|
| #include "remoting/host/host_exit_codes.h"
|
| +#include "remoting/host/switches.h"
|
| #include "remoting/host/worker_process_ipc_delegate.h"
|
|
|
| using base::TimeDelta;
|
| @@ -163,6 +165,16 @@ void WorkerProcessLauncher::OnChannelError() {
|
| }
|
| }
|
|
|
| +void WorkerProcessLauncher::AppendSwitches(
|
| + base::CommandLine* command_line) const {
|
| + DCHECK(command_line);
|
| + if (start_counter_ == 1) {
|
| + return;
|
| + }
|
| +
|
| + command_line->AppendSwitch(kSafeMode);
|
| +}
|
| +
|
| void WorkerProcessLauncher::OnObjectSignaled(HANDLE object) {
|
| DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| DCHECK(!process_watcher_.GetWatchedObject());
|
| @@ -189,6 +201,7 @@ void WorkerProcessLauncher::LaunchWorker() {
|
|
|
| exit_code_ = CONTROL_C_EXIT;
|
|
|
| + start_counter_++;
|
| // Make sure launching a process will not take forever.
|
| launch_result_timer_.Start(
|
| FROM_HERE, base::TimeDelta::FromSeconds(kLaunchResultTimeoutSeconds),
|
|
|