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

Unified Diff: remoting/host/linux/certificate_watcher_inhibitor.cc

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, 9 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
Index: remoting/host/linux/certificate_watcher_inhibitor.cc
diff --git a/remoting/host/linux/certificate_watcher_inhibitor.cc b/remoting/host/linux/certificate_watcher_inhibitor.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c574dc604efbfffb44c0cb1c3bad1d9d19f931a2
--- /dev/null
+++ b/remoting/host/linux/certificate_watcher_inhibitor.cc
@@ -0,0 +1,25 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/host/linux/certificate_watcher_inhibitor.h"
+
+#include "base/logging.h"
+
+namespace remoting {
+
+CertificateWatcherInhibitor::CertificateWatcherInhibitor(
+ CertificateWatcher& cert_watcher) :
+ cert_watcher_(cert_watcher) {}
+
+void CertificateWatcherInhibitor::OnClientConnected(const std::string& jid) {
+ cert_watcher_.Inhibit();
+ LOG(INFO) << "CertificateWatcher inhibited (connection established).";
+}
+
+void CertificateWatcherInhibitor::OnClientDisconnected(const std::string& jid) {
+ cert_watcher_.Uninhibit();
+ LOG(INFO) << "CertificateWatcher uninhibited (connection dropped).";
+}
+
+}

Powered by Google App Engine
This is Rietveld 408576698