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

Side by Side Diff: remoting/host/heartbeat_sender.h

Issue 910403002: Suspend (rather than shut down) the host upon policy errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mistyped-policies
Patch Set: Rebasing... Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/host/host_signaling_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_HEARTBEAT_SENDER_H_ 5 #ifndef REMOTING_HOST_HEARTBEAT_SENDER_H_
6 #define REMOTING_HOST_HEARTBEAT_SENDER_H_ 6 #define REMOTING_HOST_HEARTBEAT_SENDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 30 matching lines...) Expand all
41 // rem:sequence-id="456" 41 // rem:sequence-id="456"
42 // xmlns:rem="google:remoting"> 42 // xmlns:rem="google:remoting">
43 // <rem:signature>.signature.</rem:signature> 43 // <rem:signature>.signature.</rem:signature>
44 // </rem:heartbeat> 44 // </rem:heartbeat>
45 // </iq> 45 // </iq>
46 // 46 //
47 // Normally the heartbeat indicates that the host is healthy and ready to 47 // Normally the heartbeat indicates that the host is healthy and ready to
48 // accept new connections from a client, but the rem:heartbeat xml element can 48 // accept new connections from a client, but the rem:heartbeat xml element can
49 // optionally include a rem:host-offline-reason attribute, which indicates that 49 // optionally include a rem:host-offline-reason attribute, which indicates that
50 // the host cannot accept connections from the client (and might possibly be 50 // the host cannot accept connections from the client (and might possibly be
51 // shutting down). The value of the host-offline-reason attribute can be a 51 // shutting down). The value of the host-offline-reason attribute can be either
52 // string from host_exit_codes.cc (i.e. "INVALID_HOST_CONFIGURATION" string). 52 // a string from host_exit_codes.cc (i.e. "INVALID_HOST_CONFIGURATION" string)
53 // or one of kHostOfflineReasonXxx constants (i.e. "POLICY_READ_ERROR" string).
53 // 54 //
54 // The sequence-id attribute of the heartbeat is a zero-based incrementally 55 // The sequence-id attribute of the heartbeat is a zero-based incrementally
55 // increasing integer unique to each heartbeat from a single host. 56 // increasing integer unique to each heartbeat from a single host.
56 // The Bot checks the value, and if it is incorrect, includes the 57 // The Bot checks the value, and if it is incorrect, includes the
57 // correct value in the result stanza. The host should then send another 58 // correct value in the result stanza. The host should then send another
58 // heartbeat, with the correct sequence-id, and increment the sequence-id in 59 // heartbeat, with the correct sequence-id, and increment the sequence-id in
59 // susbequent heartbeats. 60 // susbequent heartbeats.
60 // The signature is a base-64 encoded SHA-1 hash, signed with the host's 61 // The signature is a base-64 encoded SHA-1 hash, signed with the host's
61 // private RSA key. The message being signed is the full Jid concatenated with 62 // private RSA key. The message being signed is the full Jid concatenated with
62 // the sequence-id, separated by one space. For example, for the heartbeat 63 // the sequence-id, separated by one space. For example, for the heartbeat
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 base::OneShotTimer<HeartbeatSender> host_offline_reason_timeout_timer_; 173 base::OneShotTimer<HeartbeatSender> host_offline_reason_timeout_timer_;
173 174
174 base::ThreadChecker thread_checker_; 175 base::ThreadChecker thread_checker_;
175 176
176 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender); 177 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender);
177 }; 178 };
178 179
179 } // namespace remoting 180 } // namespace remoting
180 181
181 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_ 182 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/host_signaling_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698