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

Unified Diff: remoting/host/daemon_process_win.cc

Issue 1061903002: Disable chromoting service on permanent errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/daemon_process.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/daemon_process_win.cc
diff --git a/remoting/host/daemon_process_win.cc b/remoting/host/daemon_process_win.cc
index 85706d59e31ee213e1c49d64f8f5ffb1de4f75bc..32bf73a0a4a9d6377eb7f0ecf8c7c9bb43d63d55 100644
--- a/remoting/host/daemon_process_win.cc
+++ b/remoting/host/daemon_process_win.cc
@@ -140,11 +140,17 @@ void DaemonProcessWin::OnChannelConnected(int32 peer_pid) {
}
void DaemonProcessWin::OnPermanentError(int exit_code) {
- // Change the service start type to 'manual' if the host has been deleted
- // remotely. This way the host will not be started every time the machine
- // boots until the user re-enable it again.
- if (exit_code == kInvalidHostIdExitCode)
+ DCHECK(kMinPermanentErrorExitCode <= exit_code &&
+ exit_code <= kMaxPermanentErrorExitCode);
+
+ // Both kInvalidHostIdExitCode and kInvalidOauthCredentialsExitCode are
+ // errors then will never go away with the current config.
+ // Disabling automatic service start until the host is re-enabled and config
+ // updated.
+ if (exit_code == kInvalidHostIdExitCode ||
+ exit_code == kInvalidOauthCredentialsExitCode) {
DisableAutoStart();
+ }
DaemonProcess::OnPermanentError(exit_code);
}
« no previous file with comments | « remoting/host/daemon_process.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698