| Index: remoting/host/remoting_me2me_host.cc
|
| diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
|
| index b4ab023aec71ba40e330b94eb16c68b1db2f74eb..5d9a485b63bdfef6343874b8ca163f8acabc4d31 100644
|
| --- a/remoting/host/remoting_me2me_host.cc
|
| +++ b/remoting/host/remoting_me2me_host.cc
|
| @@ -216,6 +216,7 @@ class HostProcess
|
| const GURL& token_validation_url,
|
| const std::string& token_validation_cert_issuer);
|
| bool OnPairingPolicyUpdate(bool pairing_enabled);
|
| + bool OnGnubbyAuthPolicyUpdate(bool enable_gnubby_auth);
|
|
|
| void StartHost();
|
|
|
| @@ -273,6 +274,7 @@ class HostProcess
|
|
|
| bool curtain_required_;
|
| ThirdPartyAuthConfig third_party_auth_config_;
|
| + bool enable_gnubby_auth_;
|
|
|
| scoped_ptr<XmppSignalStrategy> signal_strategy_;
|
| scoped_ptr<SignalingConnector> signaling_connector_;
|
| @@ -303,6 +305,7 @@ HostProcess::HostProcess(scoped_ptr<ChromotingHostContext> context,
|
| allow_nat_traversal_(true),
|
| allow_pairing_(true),
|
| curtain_required_(false),
|
| + enable_gnubby_auth_(false),
|
| #if defined(REMOTING_MULTI_PROCESS)
|
| desktop_session_connector_(NULL),
|
| #endif // defined(REMOTING_MULTI_PROCESS)
|
| @@ -800,6 +803,11 @@ void HostProcess::OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies) {
|
| &bool_value)) {
|
| restart_required |= OnPairingPolicyUpdate(bool_value);
|
| }
|
| + if (policies->GetBoolean(
|
| + policy_hack::PolicyWatcher::kHostAllowGnubbyAuthPolicyName,
|
| + &bool_value)) {
|
| + restart_required |= OnGnubbyAuthPolicyUpdate(bool_value);
|
| + }
|
|
|
| if (state_ == HOST_INITIALIZING) {
|
| StartHost();
|
| @@ -965,6 +973,22 @@ bool HostProcess::OnPairingPolicyUpdate(bool allow_pairing) {
|
| return true;
|
| }
|
|
|
| +bool HostProcess::OnGnubbyAuthPolicyUpdate(bool enable_gnubby_auth) {
|
| + DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
| +
|
| + if (enable_gnubby_auth_ == enable_gnubby_auth)
|
| + return false;
|
| +
|
| + if (enable_gnubby_auth) {
|
| + HOST_LOG << "Policy enables gnubby auth.";
|
| + } else {
|
| + HOST_LOG << "Policy disables gnubby auth.";
|
| + }
|
| + enable_gnubby_auth_ = enable_gnubby_auth;
|
| +
|
| + return true;
|
| +}
|
| +
|
| void HostProcess::StartHost() {
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
| DCHECK(!host_);
|
| @@ -1049,6 +1073,7 @@ void HostProcess::StartHost() {
|
| #endif // !defined(REMOTING_MULTI_PROCESS)
|
|
|
| host_->SetEnableCurtaining(curtain_required_);
|
| + host_->SetEnableGnubbyAuth(enable_gnubby_auth_);
|
| host_->Start(host_owner_);
|
|
|
| CreateAuthenticatorFactory();
|
|
|