summaryrefslogtreecommitdiffstats
path: root/remoting/remoting_host_srcs.gypi
diff options
context:
space:
mode:
authorlukasza <lukasza@chromium.org>2015-03-03 10:36:28 -0800
committerCommit bot <commit-bot@chromium.org>2015-03-03 18:38:00 +0000
commit0d40d8ac2eb00482d8bb24924322f75b980525f1 (patch)
treede2403d43da6dfa75c1d6ec8e1071dbc14cd746c /remoting/remoting_host_srcs.gypi
parent3a2bce8a5ebccb99596ac4f3c05b86912b96469c (diff)
downloadchromium_src-0d40d8ac2eb00482d8bb24924322f75b980525f1.zip
chromium_src-0d40d8ac2eb00482d8bb24924322f75b980525f1.tar.gz
chromium_src-0d40d8ac2eb00482d8bb24924322f75b980525f1.tar.bz2
Malformed PortRange or ThirdPartyAuthConfig should trigger OnPolicyError.
Before this change a malformed value of RemoteAccessHostUdpPortRange policy (i.e. "123456-blah") was ignored and a default value was used. Similarily for the 3 third-party-auth-config policies (RemoteAccessHostTokenUrl, ...TokenValidationUrl and ...TokenValidationCertificateIssuer) we were falling back to a secure default, but not reporting a policy error. After this change such malformed values will trigger an OnPolicyError callback. Notes: - Guaranteeing that PolicyWatcher always returns valid policy values, removes the need for a "rejecting" Me2MeHostAuthenticatorFactory. - Moving PortRange and ThirdPartyAuthConfig to separate compilation units helps readability elsewhere + encourages better unit tests coverage. - Initially I tried to wrap all policies in a new ChromotingPolicies class, but eventually went back to prevalidating and passing base::DictionaryValue. - Arguments for using ChromotingPolicies: - Helps avoid overtesting in policy_watcher_unittests.cc (i.e. helps focus the tests on a single policy value). - Arguments for using base::DictionaryValue: - Minimizes changes. - Keeps things simple (as opposed to having to introduce a custom equivalent of optional<T> [nothing similar present in Chromium AFAICT]). - Neutral: - Strong-typing of ChromotingPolicies didn't help readability as much as I expected and hoped for. BUG=427513 TEST=remoting_unittests Review URL: https://codereview.chromium.org/966433002 Cr-Commit-Position: refs/heads/master@{#318910}
Diffstat (limited to 'remoting/remoting_host_srcs.gypi')
-rw-r--r--remoting/remoting_host_srcs.gypi2
1 files changed, 2 insertions, 0 deletions
diff --git a/remoting/remoting_host_srcs.gypi b/remoting/remoting_host_srcs.gypi
index 9c99640..15d3eb0 100644
--- a/remoting/remoting_host_srcs.gypi
+++ b/remoting/remoting_host_srcs.gypi
@@ -218,6 +218,8 @@
'host/single_window_input_injector_linux.cc',
'host/single_window_input_injector_mac.cc',
'host/single_window_input_injector_win.cc',
+ 'host/third_party_auth_config.cc',
+ 'host/third_party_auth_config.h',
'host/token_validator_base.cc',
'host/token_validator_base.h',
'host/token_validator_factory_impl.cc',