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

Side by Side Diff: remoting/host/security_key/security_key_extension_session.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_extension_session.h" 5 #include "remoting/host/security_key/security_key_extension_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 : client_stub_(client_stub) { 68 : client_stub_(client_stub) {
69 DCHECK(client_stub_); 69 DCHECK(client_stub_);
70 70
71 security_key_auth_handler_ = remoting::SecurityKeyAuthHandler::Create( 71 security_key_auth_handler_ = remoting::SecurityKeyAuthHandler::Create(
72 client_session_details, 72 client_session_details,
73 base::Bind(&SecurityKeyExtensionSession::SendMessageToClient, 73 base::Bind(&SecurityKeyExtensionSession::SendMessageToClient,
74 base::Unretained(this)), 74 base::Unretained(this)),
75 file_task_runner); 75 file_task_runner);
76 } 76 }
77 77
78 SecurityKeyExtensionSession::~SecurityKeyExtensionSession() {} 78 SecurityKeyExtensionSession::~SecurityKeyExtensionSession() {
79 DCHECK(thread_checker_.CalledOnValidThread());
80 }
79 81
80 // Returns true if the |message| is a Security Key ExtensionMessage. 82 // Returns true if the |message| is a Security Key ExtensionMessage.
81 // This is done so the host does not pass |message| to other HostExtensions. 83 // This is done so the host does not pass |message| to other HostExtensions.
82 // TODO(joedow): Use |client_session_details| to disconnect the session if we 84 // TODO(joedow): Use |client_session_details| to disconnect the session if we
83 // receive an invalid extension message. 85 // receive an invalid extension message.
84 bool SecurityKeyExtensionSession::OnExtensionMessage( 86 bool SecurityKeyExtensionSession::OnExtensionMessage(
85 ClientSessionDetails* client_session_details, 87 ClientSessionDetails* client_session_details,
86 protocol::ClientStub* client_stub, 88 protocol::ClientStub* client_stub,
87 const protocol::ExtensionMessage& message) { 89 const protocol::ExtensionMessage& message) {
88 DCHECK(thread_checker_.CalledOnValidThread()); 90 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 std::unique_ptr<SecurityKeyAuthHandler> security_key_auth_handler) { 207 std::unique_ptr<SecurityKeyAuthHandler> security_key_auth_handler) {
206 DCHECK(security_key_auth_handler); 208 DCHECK(security_key_auth_handler);
207 209
208 security_key_auth_handler_ = std::move(security_key_auth_handler); 210 security_key_auth_handler_ = std::move(security_key_auth_handler);
209 security_key_auth_handler_->SetSendMessageCallback( 211 security_key_auth_handler_->SetSendMessageCallback(
210 base::Bind(&SecurityKeyExtensionSession::SendMessageToClient, 212 base::Bind(&SecurityKeyExtensionSession::SendMessageToClient,
211 base::Unretained(this))); 213 base::Unretained(this)));
212 } 214 }
213 215
214 } // namespace remoting 216 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/security_key/security_key_auth_handler_win.cc ('k') | remoting/host/security_key/security_key_ipc_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698