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

Side by Side Diff: remoting/host/linux/certificate_watcher.cc

Issue 2888733002: Adding ThreadChecker validation to d'tors for host classes (Closed)
Patch Set: Created 3 years, 7 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 | « remoting/host/heartbeat_sender.cc ('k') | remoting/host/linux/x11_character_injector.cc » ('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 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/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/hash.h" 10 #include "base/hash.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 91 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
92 base::FilePath cert_watch_path, 92 base::FilePath cert_watch_path,
93 base::TimeDelta read_delay) 93 base::TimeDelta read_delay)
94 : watcher_(watcher), 94 : watcher_(watcher),
95 caller_task_runner_(caller_task_runner), 95 caller_task_runner_(caller_task_runner),
96 cert_watch_path_(cert_watch_path), 96 cert_watch_path_(cert_watch_path),
97 delay_(read_delay) { 97 delay_(read_delay) {
98 thread_checker_.DetachFromThread(); 98 thread_checker_.DetachFromThread();
99 } 99 }
100 100
101 CertDbContentWatcher::~CertDbContentWatcher() {} 101 CertDbContentWatcher::~CertDbContentWatcher() {
102 DCHECK(thread_checker_.CalledOnValidThread());
103 }
102 104
103 void CertDbContentWatcher::StartWatching() { 105 void CertDbContentWatcher::StartWatching() {
104 DCHECK(!cert_watch_path_.empty()); 106 DCHECK(!cert_watch_path_.empty());
105 DCHECK(thread_checker_.CalledOnValidThread()); 107 DCHECK(thread_checker_.CalledOnValidThread());
106 108
107 file_watcher_.reset(new base::FilePathWatcher()); 109 file_watcher_.reset(new base::FilePathWatcher());
108 110
109 // Initialize hash value. 111 // Initialize hash value.
110 current_hash_ = ComputeHash(); 112 current_hash_ = ComputeHash();
111 113
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 if (inhibit_mode_) { 256 if (inhibit_mode_) {
255 restart_pending_ = true; 257 restart_pending_ = true;
256 return; 258 return;
257 } 259 }
258 260
259 VLOG(1) << "Certificate was updated. Calling restart..."; 261 VLOG(1) << "Certificate was updated. Calling restart...";
260 restart_action_.Run(); 262 restart_action_.Run();
261 } 263 }
262 264
263 } // namespace remoting 265 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/heartbeat_sender.cc ('k') | remoting/host/linux/x11_character_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698