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

Side by Side Diff: remoting/host/security_key/security_key_auth_handler_win.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 <cstdint> 7 #include <cstdint>
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 SecurityKeyAuthHandlerWin::SecurityKeyAuthHandlerWin( 122 SecurityKeyAuthHandlerWin::SecurityKeyAuthHandlerWin(
123 ClientSessionDetails* client_session_details) 123 ClientSessionDetails* client_session_details)
124 : client_session_details_(client_session_details), 124 : client_session_details_(client_session_details),
125 disconnect_timeout_(kInitialRequestTimeout), 125 disconnect_timeout_(kInitialRequestTimeout),
126 weak_factory_(this) { 126 weak_factory_(this) {
127 DCHECK(client_session_details_); 127 DCHECK(client_session_details_);
128 } 128 }
129 129
130 SecurityKeyAuthHandlerWin::~SecurityKeyAuthHandlerWin() {} 130 SecurityKeyAuthHandlerWin::~SecurityKeyAuthHandlerWin() {
131 DCHECK(thread_checker_.CalledOnValidThread());
132 }
131 133
132 void SecurityKeyAuthHandlerWin::CreateSecurityKeyConnection() { 134 void SecurityKeyAuthHandlerWin::CreateSecurityKeyConnection() {
133 DCHECK(thread_checker_.CalledOnValidThread()); 135 DCHECK(thread_checker_.CalledOnValidThread());
134 StartIpcServerChannel(); 136 StartIpcServerChannel();
135 } 137 }
136 138
137 bool SecurityKeyAuthHandlerWin::IsValidConnectionId(int connection_id) const { 139 bool SecurityKeyAuthHandlerWin::IsValidConnectionId(int connection_id) const {
138 DCHECK(thread_checker_.CalledOnValidThread()); 140 DCHECK(thread_checker_.CalledOnValidThread());
139 return connection_id != last_connection_id_ && 141 return connection_id != last_connection_id_ &&
140 (GetChannelForConnectionId(connection_id) != active_channels_.end()); 142 (GetChannelForConnectionId(connection_id) != active_channels_.end());
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 SecurityKeyAuthHandlerWin::GetChannelForConnectionId(int connection_id) const { 211 SecurityKeyAuthHandlerWin::GetChannelForConnectionId(int connection_id) const {
210 return active_channels_.find(connection_id); 212 return active_channels_.find(connection_id);
211 } 213 }
212 214
213 void SecurityKeyAuthHandlerWin::OnChannelConnected() { 215 void SecurityKeyAuthHandlerWin::OnChannelConnected() {
214 // Create another server to accept the next connection. 216 // Create another server to accept the next connection.
215 StartIpcServerChannel(); 217 StartIpcServerChannel();
216 } 218 }
217 219
218 } // namespace remoting 220 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698