| Index: remoting/host/heartbeat_sender.cc
|
| diff --git a/remoting/host/heartbeat_sender.cc b/remoting/host/heartbeat_sender.cc
|
| index f22486c8bac63e0c0af095bf45a5e3345c0c42fe..af739b0930e5be1acd21584d71d6f248db07cf7b 100644
|
| --- a/remoting/host/heartbeat_sender.cc
|
| +++ b/remoting/host/heartbeat_sender.cc
|
| @@ -5,7 +5,7 @@
|
| #include "remoting/host/heartbeat_sender.h"
|
|
|
| #include "base/logging.h"
|
| -#include "base/message_loop.h"
|
| +#include "base/message_loop_proxy.h"
|
| #include "base/string_number_conversions.h"
|
| #include "base/time.h"
|
| #include "remoting/base/constants.h"
|
| @@ -33,7 +33,7 @@ const char kSetIntervalTag[] = "set-interval";
|
| const int64 kDefaultHeartbeatIntervalMs = 5 * 60 * 1000; // 5 minutes.
|
| }
|
|
|
| -HeartbeatSender::HeartbeatSender(MessageLoop* message_loop,
|
| +HeartbeatSender::HeartbeatSender(base::MessageLoopProxy* message_loop,
|
| MutableHostConfig* config)
|
|
|
| : state_(CREATED),
|
| @@ -66,7 +66,7 @@ bool HeartbeatSender::Init() {
|
|
|
| void HeartbeatSender::OnSignallingConnected(SignalStrategy* signal_strategy,
|
| const std::string& full_jid) {
|
| - DCHECK_EQ(MessageLoop::current(), message_loop_);
|
| + DCHECK(message_loop_->BelongsToCurrentThread());
|
| DCHECK(state_ == INITIALIZED || state_ == STOPPED);
|
| state_ = STARTED;
|
|
|
| @@ -80,7 +80,7 @@ void HeartbeatSender::OnSignallingConnected(SignalStrategy* signal_strategy,
|
| }
|
|
|
| void HeartbeatSender::OnSignallingDisconnected() {
|
| - DCHECK_EQ(MessageLoop::current(), message_loop_);
|
| + DCHECK(message_loop_->BelongsToCurrentThread());
|
| state_ = STOPPED;
|
| request_.reset(NULL);
|
| }
|
| @@ -95,7 +95,7 @@ void HeartbeatSender::OnClientDisconnected(
|
| void HeartbeatSender::OnShutdown() { }
|
|
|
| void HeartbeatSender::DoSendStanza() {
|
| - DCHECK_EQ(MessageLoop::current(), message_loop_);
|
| + DCHECK(message_loop_->BelongsToCurrentThread());
|
| DCHECK_EQ(state_, STARTED);
|
|
|
| VLOG(1) << "Sending heartbeat stanza to " << kChromotingBotJid;
|
| @@ -103,7 +103,7 @@ void HeartbeatSender::DoSendStanza() {
|
| }
|
|
|
| void HeartbeatSender::ProcessResponse(const XmlElement* response) {
|
| - DCHECK_EQ(MessageLoop::current(), message_loop_);
|
| + DCHECK(message_loop_->BelongsToCurrentThread());
|
|
|
| std::string type = response->Attr(buzz::QN_TYPE);
|
| if (type == buzz::STR_ERROR) {
|
|
|