OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 #include "remoting/host/linux/certificate_watcher.h" | 5 #include "remoting/host/linux/certificate_watcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 | 13 |
14 namespace remoting { | 14 namespace remoting { |
15 | 15 |
16 // Delay time to restart the host when a change of certificate is detected. | 16 // Delay time to restart the host when a change of certificate is detected. |
17 // This is to avoid repeating restarts when continuous writes to the database | 17 // This is to avoid repeating restarts when continuous writes to the database |
18 // occur. | 18 // occur. |
19 const int kRestartDelayInSecond = 2; | 19 const int kRestartDelayInSecond = 2; |
20 | 20 |
21 // Full Path: $HOME/.pki/nssdb | 21 // Full Path: $HOME/.pki/nssdb |
22 const char kCertDirectoryPath[] = ".pki/nssdb"; | 22 const char kCertDirectoryPath[] = ".pki/nssdb"; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 if (inhibit_mode_) { | 136 if (inhibit_mode_) { |
137 restart_pending_ = true; | 137 restart_pending_ = true; |
138 return; | 138 return; |
139 } | 139 } |
140 | 140 |
141 VLOG(1) << "Certificate was updated. Calling restart..."; | 141 VLOG(1) << "Certificate was updated. Calling restart..."; |
142 restart_action_.Run(); | 142 restart_action_.Run(); |
143 } | 143 } |
144 | 144 |
145 } // namespace remoting | 145 } // namespace remoting |
OLD | NEW |