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

Unified Diff: chrome/service/remoting/chromoting_host_manager.cc

Issue 6911024: Add HostObserverInterface and decouple HeartbeatSender and ChromotingHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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
« no previous file with comments | « no previous file | remoting/host/chromoting_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/remoting/chromoting_host_manager.cc
diff --git a/chrome/service/remoting/chromoting_host_manager.cc b/chrome/service/remoting/chromoting_host_manager.cc
index 12b2adc769d3141598613d4293cde0ab1bb12207..39fdd701ff765889c539b62d27830e314a8276a5 100644
--- a/chrome/service/remoting/chromoting_host_manager.cc
+++ b/chrome/service/remoting/chromoting_host_manager.cc
@@ -11,6 +11,8 @@
#include "net/base/net_util.h"
#include "remoting/base/constants.h"
#include "remoting/host/chromoting_host_context.h"
+#include "remoting/host/heartbeat_sender.h"
+#include "remoting/host/host_key_pair.h"
#include "remoting/host/json_host_config.h"
namespace remoting {
@@ -179,6 +181,15 @@ void ChromotingHostManager::Start() {
chromoting_host_ = remoting::ChromotingHost::Create(chromoting_context_.get(),
chromoting_config_);
+ // Initialize HeartbeatSender.
+ scoped_refptr<remoting::HeartbeatSender> heartbeat_sender =
+ new remoting::HeartbeatSender(chromoting_context_->network_message_loop(),
+ chromoting_config_);
+ if (!heartbeat_sender->Init())
+ LOG(ERROR) << "Failed to initialize heartbeat sender.";
+ chromoting_host_->AddStatusObserver(heartbeat_sender);
+
+
// Then start the chromoting host.
// When ChromotingHost is shutdown because of failure or a request that
// we made OnChromotingShutdown() is calls.
« no previous file with comments | « no previous file | remoting/host/chromoting_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698