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

Side by Side Diff: remoting/host/linux/certificate_watcher_inhibitor.h

Issue 1838313002: Restart the host when the third party auth certificate changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_LINUX_CERTIFICATE_WATCHER_INHIBITOR_H_
6 #define REMOTING_HOST_LINUX_CERTIFICATE_WATCHER_INHIBITOR_H_
7
8 #include "base/macros.h"
9 #include "remoting/host/host_status_observer.h"
10 #include "remoting/host/linux/certificate_watcher.h"
11
12 namespace remoting {
13
14 /**
Sergey Ulanov 2016/03/29 19:40:04 Use C++ style comments please: // Blah blah.
Yuwei 2016/03/29 19:57:02 Acknowledged.
15 * This class observes host status changes and inhibits the certificate watcher
16 * when the client connects and uninhibits when the client disconnects so that
17 * the host will not be killed when the connection is established. When the
18 * client disconnects, the host will be killed if the certificate was changed
19 * during the session.
20 */
21 class CertificateWatcherInhibitor : public remoting::HostStatusObserver {
Sergey Ulanov 2016/03/29 19:40:04 Why does this need to be separate from Certificate
Yuwei 2016/03/29 19:57:02 Will merge them and use temp files to test
22 public:
23 // constructs CertificateWatcherInhibitor.
24 // Will not take ownership of cert_watcher
25 CertificateWatcherInhibitor(CertificateWatcher& cert_watcher);
26
27 // inhibits CertificateWatcher when the client connects
28 void OnClientConnected(const std::string& jid) override;
29
30 // uninhibits CertificateWatcher when the client disconnects
31 void OnClientDisconnected(const std::string& jid) override;
32
33 private:
34 CertificateWatcher& cert_watcher_;
35 DISALLOW_COPY_AND_ASSIGN(CertificateWatcherInhibitor);
36 };
37
38 }
39
40 #endif // REMOTING_HOST_LINUX_CERTIFICATE_WATCHER_INHIBITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698