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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 734053003: Reporting of policy errors via host-offline-reason: part 2b (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hor-nohoststatussender
Patch Set: Rebasing... Created 6 years, 1 month 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 | « remoting/host/mock_callback.h ('k') | remoting/remoting_test.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index fa14f80dbe4459d12f1a11bc161d997dc2d47abb..f2aa98331acea8f1f8076cf4540bed9a2c5220c0 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -140,7 +140,6 @@ namespace remoting {
class HostProcess
: public ConfigWatcher::Delegate,
- public HeartbeatSender::Listener,
public HostChangeNotificationListener::Listener,
public IPC::Listener,
public base::RefCountedThreadSafe<HostProcess> {
@@ -156,10 +155,6 @@ class HostProcess
bool OnMessageReceived(const IPC::Message& message) override;
void OnChannelError() override;
- // HeartbeatSender::Listener overrides.
- void OnHeartbeatSuccessful() override;
- void OnUnknownHostIdError() override;
-
// HostChangeNotificationListener::Listener overrides.
void OnHostDeleted() override;
@@ -247,6 +242,9 @@ class HostProcess
void StartHost();
+ void OnHeartbeatSuccessful();
+ void OnUnknownHostIdError();
+
void OnAuthFailed();
void RestartHost();
@@ -1323,8 +1321,9 @@ void HostProcess::StartHost() {
#endif
heartbeat_sender_.reset(new HeartbeatSender(
- this, host_id_, signal_strategy_.get(), key_pair_,
- directory_bot_jid_));
+ base::Bind(&HostProcess::OnHeartbeatSuccessful, base::Unretained(this)),
+ base::Bind(&HostProcess::OnUnknownHostIdError, base::Unretained(this)),
+ host_id_, signal_strategy_.get(), key_pair_, directory_bot_jid_));
host_change_notification_listener_.reset(new HostChangeNotificationListener(
this, host_id_, signal_strategy_.get(), directory_bot_jid_));
« no previous file with comments | « remoting/host/mock_callback.h ('k') | remoting/remoting_test.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698