| Index: remoting/host/linux/certificate_watcher.h
|
| diff --git a/remoting/host/linux/certificate_watcher.h b/remoting/host/linux/certificate_watcher.h
|
| index 5dee61d3cff6d6e6f1274751e996d94c36228613..958e2ab4479cc56751393fa0138b0fff467ce69f 100644
|
| --- a/remoting/host/linux/certificate_watcher.h
|
| +++ b/remoting/host/linux/certificate_watcher.h
|
| @@ -17,6 +17,8 @@
|
|
|
| namespace remoting {
|
|
|
| +class CertificateWatcherImpl;
|
| +
|
| // This class watches the cert database and notifies the host to restart when
|
| // a change of the database is detected. The runner script will restart the host
|
| // when the host is killed then the new host will capture any new changes of the
|
| @@ -56,17 +58,13 @@ class CertificateWatcher : public remoting::HostStatusObserver {
|
| void SetWatchPathForTests(const base::FilePath& watch_path);
|
|
|
| private:
|
| + friend class CertificateWatcherImpl;
|
| +
|
| // Returns true if the watcher has started.
|
| bool is_started() const;
|
|
|
| - // Callback passed to |file_watcher_|. Runs in IO thread.
|
| - static void OnCertDirectoryChanged(
|
| - scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
|
| - base::WeakPtr<CertificateWatcher> watcher_, const base::FilePath& path,
|
| - bool error);
|
| -
|
| // Runs in the caller's thread.
|
| - void DirectoryChanged(const base::FilePath& path, bool error);
|
| + void DatabaseChanged(const base::FilePath& path, bool error);
|
|
|
| // Called by |restart_timer_| when it's time to reset the host.
|
| // It will defer restart if |inhibit_restart_scheduled_| flag is set to true.
|
| @@ -91,8 +89,8 @@ class CertificateWatcher : public remoting::HostStatusObserver {
|
| // Path of the certificate files/directories.
|
| base::FilePath cert_watch_path_;
|
|
|
| - // The file watcher to watch changes inside the certificate folder.
|
| - std::unique_ptr<base::FilePathWatcher> file_watcher_;
|
| + // The watcher implementation that watches the files on the IO thread.
|
| + std::unique_ptr<CertificateWatcherImpl> watcher_impl_;
|
|
|
| // The time to wait to restart when it is scheduled.
|
| base::TimeDelta delay_;
|
|
|