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

Unified Diff: remoting/host/client_session.cc

Issue 138753005: Add gnubby authentication to remoting host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows warning Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 52feba70462efae8bc4d28cce9f9f09cd605d073..6057f122a80b73f814319db05887a3564e8dca31 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -197,9 +197,15 @@ void ClientSession::DeliverClientMessage(
reply.set_data(message.data().substr(0, 16));
connection_->client_stub()->DeliverHostMessage(reply);
return;
+ } else if (message.type() == "gnubby-auth") {
+ if (gnubby_auth_handler_) {
+ gnubby_auth_handler_->DeliverClientMessage(message.data());
+ } else {
+ HOST_LOG << "gnubby auth is not enabled";
+ }
+ return;
}
}
- // No messages are currently supported.
HOST_LOG << "Unexpected message received: "
<< message.type() << ": " << message.data();
}
@@ -288,6 +294,10 @@ void ClientSession::OnConnectionAuthenticated(
audio_encoder.Pass(),
connection_->audio_stub());
}
+
+ // Create a GnubbyAuthHandler to proxy gnubbyd messages.
+ gnubby_auth_handler_ = desktop_environment_->CreateGnubbyAuthHandler(
+ connection_->client_stub());
}
void ClientSession::OnConnectionChannelsConnected(
@@ -412,6 +422,11 @@ void ClientSession::SetDisableInputs(bool disable_inputs) {
disable_clipboard_filter_.set_enabled(!disable_inputs);
}
+void ClientSession::SetGnubbyAuthHandlerForTesting(
+ GnubbyAuthHandler* gnubby_auth_handler) {
+ gnubby_auth_handler_.reset(gnubby_auth_handler);
+}
+
scoped_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() {
DCHECK(CalledOnValidThread());
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698