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

Unified Diff: remoting/host/me2me_desktop_environment.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/me2me_desktop_environment.h ('k') | remoting/host/policy_hack/policy_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/me2me_desktop_environment.cc
diff --git a/remoting/host/me2me_desktop_environment.cc b/remoting/host/me2me_desktop_environment.cc
index f9f9113f72d1ebf7b73ecabf916873fd39227fda..abf9a99c953073bfd783e497ae152f328301ac6c 100644
--- a/remoting/host/me2me_desktop_environment.cc
+++ b/remoting/host/me2me_desktop_environment.cc
@@ -6,9 +6,11 @@
#include "base/logging.h"
#include "base/single_thread_task_runner.h"
+#include "remoting/base/logging.h"
#include "remoting/host/client_session_control.h"
#include "remoting/host/curtain_mode.h"
#include "remoting/host/desktop_resizer.h"
+#include "remoting/host/gnubby_auth_handler.h"
#include "remoting/host/host_window.h"
#include "remoting/host/host_window.h"
#include "remoting/host/host_window_proxy.h"
@@ -58,10 +60,23 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment(
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner)
: BasicDesktopEnvironment(caller_task_runner,
input_task_runner,
- ui_task_runner) {
+ ui_task_runner),
+ gnubby_auth_enabled_(false) {
DCHECK(caller_task_runner->BelongsToCurrentThread());
}
+scoped_ptr<GnubbyAuthHandler> Me2MeDesktopEnvironment::CreateGnubbyAuthHandler(
+ protocol::ClientStub* client_stub) {
+ DCHECK(caller_task_runner()->BelongsToCurrentThread());
+
+ if (gnubby_auth_enabled_)
+ return scoped_ptr<GnubbyAuthHandler>(
+ GnubbyAuthHandler::Create(client_stub));
+
+ HOST_LOG << "gnubby auth is not enabled";
+ return scoped_ptr<GnubbyAuthHandler>();
+}
+
bool Me2MeDesktopEnvironment::InitializeSecurity(
base::WeakPtr<ClientSessionControl> client_session_control,
bool curtain_enabled) {
@@ -115,6 +130,10 @@ bool Me2MeDesktopEnvironment::InitializeSecurity(
return true;
}
+void Me2MeDesktopEnvironment::SetEnableGnubbyAuth(bool gnubby_auth_enabled) {
+ gnubby_auth_enabled_ = gnubby_auth_enabled;
+}
+
Me2MeDesktopEnvironmentFactory::Me2MeDesktopEnvironmentFactory(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
@@ -140,6 +159,7 @@ scoped_ptr<DesktopEnvironment> Me2MeDesktopEnvironmentFactory::Create(
curtain_enabled_)) {
return scoped_ptr<DesktopEnvironment>();
}
+ desktop_environment->SetEnableGnubbyAuth(gnubby_auth_enabled_);
return desktop_environment.PassAs<DesktopEnvironment>();
}
@@ -150,4 +170,9 @@ void Me2MeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) {
curtain_enabled_ = enable;
}
+void Me2MeDesktopEnvironmentFactory::SetEnableGnubbyAuth(
+ bool gnubby_auth_enabled) {
+ gnubby_auth_enabled_ = gnubby_auth_enabled;
+}
+
} // namespace remoting
« no previous file with comments | « remoting/host/me2me_desktop_environment.h ('k') | remoting/host/policy_hack/policy_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698