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

Unified Diff: remoting/host/heartbeat_sender.cc

Issue 3105002: Resubmit "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
« no previous file with comments | « chrome/service/service_process_unittest.cc ('k') | remoting/jingle_glue/jingle_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « chrome/service/service_process_unittest.cc ('k') | remoting/jingle_glue/jingle_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698