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

Unified Diff: remoting/host/win/worker_process_launcher.cc

Issue 2936603003: [Chromoting] Implement host safe-mode
Patch Set: Created 3 years, 6 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 | « remoting/host/win/worker_process_launcher.h ('k') | remoting/host/win/wts_session_process_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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),
« no previous file with comments | « remoting/host/win/worker_process_launcher.h ('k') | remoting/host/win/wts_session_process_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698