Index: remoting/host/log_to_server.cc |
diff --git a/remoting/host/log_to_server.cc b/remoting/host/log_to_server.cc |
index f4830f6f192ed8b7c98feabc72fcc6568b14e505..017274c0b73694e1d28419581fbf62d6ca814eef 100644 |
--- a/remoting/host/log_to_server.cc |
+++ b/remoting/host/log_to_server.cc |
@@ -7,7 +7,7 @@ |
#include "base/bind.h" |
#include "base/message_loop_proxy.h" |
#include "remoting/base/constants.h" |
-#include "remoting/host/chromoting_host.h" |
+#include "remoting/host/host_status_monitor.h" |
#include "remoting/host/server_log_entry.h" |
#include "remoting/jingle_glue/iq_sender.h" |
#include "remoting/jingle_glue/signal_strategy.h" |
@@ -20,25 +20,25 @@ using buzz::XmlElement; |
namespace remoting { |
-LogToServer::LogToServer(ChromotingHost* host, |
+LogToServer::LogToServer(base::WeakPtr<HostStatusMonitor> monitor, |
ServerLogEntry::Mode mode, |
SignalStrategy* signal_strategy, |
const std::string& directory_bot_jid) |
- : host_(host), |
+ : monitor_(monitor), |
mode_(mode), |
signal_strategy_(signal_strategy), |
directory_bot_jid_(directory_bot_jid) { |
signal_strategy_->AddListener(this); |
- // |host| may be NULL in tests. |
- if (host_) |
- host_->AddStatusObserver(this); |
rmsousa
2013/03/01 01:41:06
Nit: now that it's a separate, much simpler class,
alexeypa (please no reviews)
2013/03/01 17:49:26
Done.
|
+ // |monitor_| may be NULL in tests. |
+ if (monitor_) |
+ monitor_->AddStatusObserver(this); |
} |
LogToServer::~LogToServer() { |
signal_strategy_->RemoveListener(this); |
- if (host_) |
- host_->RemoveStatusObserver(this); |
+ if (monitor_) |
+ monitor_->RemoveStatusObserver(this); |
} |
void LogToServer::LogSessionStateChange(const std::string& jid, |