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

Side by Side Diff: remoting/host/security_key/security_key_auth_handler_posix.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
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/security_key/security_key_auth_handler.h" 5 #include "remoting/host/security_key/security_key_auth_handler.h"
6 6
7 #include <unistd.h> 7 #include <unistd.h>
8 8
9 #include <cstdint> 9 #include <cstdint>
10 #include <map> 10 #include <map>
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 SecurityKeyAuthHandlerPosix::SecurityKeyAuthHandlerPosix( 147 SecurityKeyAuthHandlerPosix::SecurityKeyAuthHandlerPosix(
148 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) 148 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner)
149 : file_task_runner_(file_task_runner), 149 : file_task_runner_(file_task_runner),
150 request_timeout_( 150 request_timeout_(
151 base::TimeDelta::FromSeconds(kDefaultRequestTimeoutSeconds)), 151 base::TimeDelta::FromSeconds(kDefaultRequestTimeoutSeconds)),
152 weak_factory_(this) {} 152 weak_factory_(this) {}
153 153
154 SecurityKeyAuthHandlerPosix::~SecurityKeyAuthHandlerPosix() { 154 SecurityKeyAuthHandlerPosix::~SecurityKeyAuthHandlerPosix() {
155 DCHECK(thread_checker_.CalledOnValidThread());
155 if (file_task_runner_) { 156 if (file_task_runner_) {
156 // Attempt to clean up the socket before being destroyed. 157 // Attempt to clean up the socket before being destroyed.
157 file_task_runner_->PostTask( 158 file_task_runner_->PostTask(
158 FROM_HERE, base::Bind(base::IgnoreResult(&base::DeleteFile), 159 FROM_HERE, base::Bind(base::IgnoreResult(&base::DeleteFile),
159 g_security_key_socket_name.Get(), 160 g_security_key_socket_name.Get(),
160 /*recursive=*/false)); 161 /*recursive=*/false));
161 } 162 }
162 } 163 }
163 164
164 void SecurityKeyAuthHandlerPosix::CreateSecurityKeyConnection() { 165 void SecurityKeyAuthHandlerPosix::CreateSecurityKeyConnection() {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 304
304 void SecurityKeyAuthHandlerPosix::RequestTimedOut(int connection_id) { 305 void SecurityKeyAuthHandlerPosix::RequestTimedOut(int connection_id) {
305 HOST_LOG << "SecurityKey request timed out for socket: " << connection_id; 306 HOST_LOG << "SecurityKey request timed out for socket: " << connection_id;
306 ActiveSockets::const_iterator iter = active_sockets_.find(connection_id); 307 ActiveSockets::const_iterator iter = active_sockets_.find(connection_id);
307 if (iter != active_sockets_.end()) { 308 if (iter != active_sockets_.end()) {
308 SendErrorAndCloseActiveSocket(iter); 309 SendErrorAndCloseActiveSocket(iter);
309 } 310 }
310 } 311 }
311 312
312 } // namespace remoting 313 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/mouse_shape_pump.cc ('k') | remoting/host/security_key/security_key_auth_handler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698