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

Unified Diff: remoting/host/policy_hack/policy_watcher.cc

Issue 209323002: New policies: enable/disable relay; port range (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
Index: remoting/host/policy_hack/policy_watcher.cc
diff --git a/remoting/host/policy_hack/policy_watcher.cc b/remoting/host/policy_hack/policy_watcher.cc
index fd1a37b07b7926894deefdac15139f915f949ec5..3855500941bb100c683b3651a95bc3c490c174bc 100644
--- a/remoting/host/policy_hack/policy_watcher.cc
+++ b/remoting/host/policy_hack/policy_watcher.cc
@@ -77,6 +77,12 @@ scoped_ptr<base::DictionaryValue> CopyGoodValuesAndAddDefaults(
const char PolicyWatcher::kNatPolicyName[] =
"RemoteAccessHostFirewallTraversal";
+const char PolicyWatcher::kRelayPolicyName[] =
Sergey Ulanov 2014/03/24 23:37:12 The new policies also need to be added in chrome/a
dcaiafa 2014/03/26 15:29:16 Done.
+ "RemoteAccessHostAllowRelayedConnection";
+
+const char PolicyWatcher::kUdpPortRangePolicyName[] =
+ "RemoteAccessHostUdpPortRange";
+
const char PolicyWatcher::kHostRequireTwoFactorPolicyName[] =
"RemoteAccessHostRequireTwoFactor";
@@ -118,6 +124,8 @@ PolicyWatcher::PolicyWatcher(
weak_factory_(this) {
// Initialize the default values for each policy.
default_values_->SetBoolean(kNatPolicyName, true);
+ default_values_->SetBoolean(kRelayPolicyName, true);
+ default_values_->SetString(kUdpPortRangePolicyName, "");
default_values_->SetBoolean(kHostRequireTwoFactorPolicyName, false);
default_values_->SetBoolean(kHostRequireCurtainPolicyName, false);
default_values_->SetBoolean(kHostMatchUsernamePolicyName, false);
@@ -138,6 +146,7 @@ PolicyWatcher::PolicyWatcher(
// For most policies these match the defaults.
bad_type_values_.reset(default_values_->DeepCopy());
bad_type_values_->SetBoolean(kNatPolicyName, false);
+ bad_type_values_->SetBoolean(kRelayPolicyName, false);
}
PolicyWatcher::~PolicyWatcher() {

Powered by Google App Engine
This is Rietveld 408576698