| Index: remoting/host/remoting_me2me_host.cc
|
| diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
|
| index 32f3f18a4f123af05967456f563157366cbe2724..4e8744c2f72a132e0f5bbede41786570496f0b78 100644
|
| --- a/remoting/host/remoting_me2me_host.cc
|
| +++ b/remoting/host/remoting_me2me_host.cc
|
| @@ -30,6 +30,7 @@
|
| #include "net/socket/client_socket_factory.h"
|
| #include "net/socket/ssl_server_socket.h"
|
| #include "net/url_request/url_fetcher.h"
|
| +#include "policy/policy_constants.h"
|
| #include "remoting/base/auto_thread_task_runner.h"
|
| #include "remoting/base/breakpad.h"
|
| #include "remoting/base/constants.h"
|
| @@ -980,8 +981,8 @@ bool HostProcess::OnHostDomainPolicyUpdate(base::DictionaryValue* policies) {
|
| // Returns true if the host has to be restarted after this policy update.
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
|
|
| - if (!policies->GetString(policy_hack::PolicyWatcher::kHostDomainPolicyName,
|
| - &host_domain_)) {
|
| + if (!policies->GetString(policy::key::kRemoteAccessHostDomain,
|
| + &host_domain_)) {
|
| return false;
|
| }
|
|
|
| @@ -1036,9 +1037,8 @@ bool HostProcess::OnUsernamePolicyUpdate(base::DictionaryValue* policies) {
|
| // Returns false: never restart the host after this policy update.
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
|
|
| - if (!policies->GetBoolean(
|
| - policy_hack::PolicyWatcher::kHostMatchUsernamePolicyName,
|
| - &host_username_match_required_)) {
|
| + if (!policies->GetBoolean(policy::key::kRemoteAccessHostMatchUsername,
|
| + &host_username_match_required_)) {
|
| return false;
|
| }
|
|
|
| @@ -1050,8 +1050,8 @@ bool HostProcess::OnNatPolicyUpdate(base::DictionaryValue* policies) {
|
| // Returns true if the host has to be restarted after this policy update.
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
|
|
| - if (!policies->GetBoolean(policy_hack::PolicyWatcher::kNatPolicyName,
|
| - &allow_nat_traversal_)) {
|
| + if (!policies->GetBoolean(policy::key::kRemoteAccessHostFirewallTraversal,
|
| + &allow_nat_traversal_)) {
|
| return false;
|
| }
|
|
|
| @@ -1067,8 +1067,9 @@ bool HostProcess::OnRelayPolicyUpdate(base::DictionaryValue* policies) {
|
| // Returns true if the host has to be restarted after this policy update.
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
|
|
| - if (!policies->GetBoolean(policy_hack::PolicyWatcher::kRelayPolicyName,
|
| - &allow_relay_)) {
|
| + if (!policies->GetBoolean(
|
| + policy::key::kRemoteAccessHostAllowRelayedConnection,
|
| + &allow_relay_)) {
|
| return false;
|
| }
|
|
|
| @@ -1085,7 +1086,7 @@ bool HostProcess::OnUdpPortPolicyUpdate(base::DictionaryValue* policies) {
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
|
|
| std::string udp_port_range;
|
| - if (!policies->GetString(policy_hack::PolicyWatcher::kUdpPortRangePolicyName,
|
| + if (!policies->GetString(policy::key::kRemoteAccessHostUdpPortRange,
|
| &udp_port_range)) {
|
| return false;
|
| }
|
| @@ -1118,9 +1119,8 @@ bool HostProcess::OnCurtainPolicyUpdate(base::DictionaryValue* policies) {
|
| // Returns true if the host has to be restarted after this policy update.
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
|
|
| - if (!policies->GetBoolean(
|
| - policy_hack::PolicyWatcher::kHostRequireCurtainPolicyName,
|
| - &curtain_required_)) {
|
| + if (!policies->GetBoolean(policy::key::kRemoteAccessHostRequireCurtain,
|
| + &curtain_required_)) {
|
| return false;
|
| }
|
|
|
| @@ -1160,9 +1160,8 @@ bool HostProcess::OnHostTalkGadgetPrefixPolicyUpdate(
|
| // Returns true if the host has to be restarted after this policy update.
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
|
|
| - if (!policies->GetString(
|
| - policy_hack::PolicyWatcher::kHostTalkGadgetPrefixPolicyName,
|
| - &talkgadget_prefix_)) {
|
| + if (!policies->GetString(policy::key::kRemoteAccessHostTalkGadgetPrefix,
|
| + &talkgadget_prefix_)) {
|
| return false;
|
| }
|
|
|
| @@ -1176,22 +1175,20 @@ bool HostProcess::OnHostTokenUrlPolicyUpdate(base::DictionaryValue* policies) {
|
|
|
| bool token_policy_changed = false;
|
| std::string token_url_string;
|
| - if (policies->GetString(
|
| - policy_hack::PolicyWatcher::kHostTokenUrlPolicyName,
|
| - &token_url_string)) {
|
| + if (policies->GetString(policy::key::kRemoteAccessHostTokenUrl,
|
| + &token_url_string)) {
|
| token_policy_changed = true;
|
| third_party_auth_config_.token_url = GURL(token_url_string);
|
| }
|
| std::string token_validation_url_string;
|
| - if (policies->GetString(
|
| - policy_hack::PolicyWatcher::kHostTokenValidationUrlPolicyName,
|
| - &token_validation_url_string)) {
|
| + if (policies->GetString(policy::key::kRemoteAccessHostTokenValidationUrl,
|
| + &token_validation_url_string)) {
|
| token_policy_changed = true;
|
| third_party_auth_config_.token_validation_url =
|
| GURL(token_validation_url_string);
|
| }
|
| if (policies->GetString(
|
| - policy_hack::PolicyWatcher::kHostTokenValidationCertIssuerPolicyName,
|
| + policy::key::kRemoteAccessHostTokenValidationCertificateIssuer,
|
| &third_party_auth_config_.token_validation_cert_issuer)) {
|
| token_policy_changed = true;
|
| }
|
| @@ -1211,9 +1208,8 @@ bool HostProcess::OnHostTokenUrlPolicyUpdate(base::DictionaryValue* policies) {
|
| bool HostProcess::OnPairingPolicyUpdate(base::DictionaryValue* policies) {
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
|
|
| - if (!policies->GetBoolean(
|
| - policy_hack::PolicyWatcher::kHostAllowClientPairing,
|
| - &allow_pairing_)) {
|
| + if (!policies->GetBoolean(policy::key::kRemoteAccessHostAllowClientPairing,
|
| + &allow_pairing_)) {
|
| return false;
|
| }
|
|
|
| @@ -1228,9 +1224,8 @@ bool HostProcess::OnPairingPolicyUpdate(base::DictionaryValue* policies) {
|
| bool HostProcess::OnGnubbyAuthPolicyUpdate(base::DictionaryValue* policies) {
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
|
|
| - if (!policies->GetBoolean(
|
| - policy_hack::PolicyWatcher::kHostAllowGnubbyAuthPolicyName,
|
| - &enable_gnubby_auth_)) {
|
| + if (!policies->GetBoolean(policy::key::kRemoteAccessHostAllowGnubbyAuth,
|
| + &enable_gnubby_auth_)) {
|
| return false;
|
| }
|
|
|
|
|