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

Unified Diff: remoting/host/chromoting_host.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
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 346e887fc46c48feeb636215fd889f0b6af92057..b40ae759cdd9e9f1e2ef6b5752909b1c58322039 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -80,6 +80,7 @@ ChromotingHost::ChromotingHost(
ui_task_runner_(ui_task_runner),
signal_strategy_(signal_strategy),
started_(false),
+ exit_code_(kSuccessExitCode),
protocol_config_(protocol::CandidateSessionConfig::CreateDefault()),
login_backoff_(&kDefaultBackoffPolicy),
authenticating_client_(false),
@@ -110,7 +111,8 @@ ChromotingHost::~ChromotingHost() {
// Notify observers.
if (started_)
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_, OnShutdown());
+ FOR_EACH_OBSERVER(HostStatusObserver, status_observers_,
+ OnShutdown(exit_code_));
}
void ChromotingHost::Start(const std::string& host_owner_email) {
@@ -126,6 +128,10 @@ void ChromotingHost::Start(const std::string& host_owner_email) {
session_manager_->Init(signal_strategy_, this);
}
+void ChromotingHost::SetExitCode(HostExitCodes exit_code) {
+ exit_code_ = exit_code;
+}
+
void ChromotingHost::AddStatusObserver(HostStatusObserver* observer) {
DCHECK(CalledOnValidThread());
status_observers_.AddObserver(observer);

Powered by Google App Engine
This is Rietveld 408576698