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

Unified Diff: remoting/host/heartbeat_sender.cc

Issue 3084024: Start chromoting host in the service process though a method call (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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/heartbeat_sender.cc
diff --git a/remoting/host/heartbeat_sender.cc b/remoting/host/heartbeat_sender.cc
index b62b268a38cf3f402cec9eb3e642f2c9fea4f409..e6a78f75fe966acc0cf42f86af003a051190efe4 100644
--- a/remoting/host/heartbeat_sender.cc
+++ b/remoting/host/heartbeat_sender.cc
@@ -65,7 +65,7 @@ void HeartbeatSender::Start() {
return;
}
- DCHECK(state_ == INITIALIZED);
+ DCHECK_EQ(INITIALIZED, state_);
state_ = STARTED;
request_.reset(jingle_client_->CreateIqRequest());
@@ -82,7 +82,9 @@ void HeartbeatSender::Stop() {
return;
}
- DCHECK(state_ == STARTED);
+ // We may call Stop() even if we have not started.
+ if (state_ != STARTED)
+ return;
state_ = STOPPED;
request_.reset(NULL);
}

Powered by Google App Engine
This is Rietveld 408576698