summaryrefslogtreecommitdiffstats
path: root/components/sync_driver/sync_policy_handler_unittest.cc
diff options
context:
space:
mode:
authorfhorschig <fhorschig@chromium.org>2015-09-18 13:04:09 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-18 20:04:50 +0000
commit2c4ce2a1988fdde3456e49112eba6c7855ca4528 (patch)
tree68d7890e854a79a62982cbe5a7b89a124b2f77bc /components/sync_driver/sync_policy_handler_unittest.cc
parentf4b1928eaa63736de442317980682bcf1244bd17 (diff)
downloadchromium_src-2c4ce2a1988fdde3456e49112eba6c7855ca4528.zip
chromium_src-2c4ce2a1988fdde3456e49112eba6c7855ca4528.tar.gz
chromium_src-2c4ce2a1988fdde3456e49112eba6c7855ca4528.tar.bz2
Add source column to chrome://policy showing the origins of policies.
These are the possible sources for a policy: Cloud - Policy values received from the cloud. Platform - Local configured policies. Enterprise Default - Defaults for policies in enterprise environments on Chrome OS. Can be overridden. Enterprise Override - Policies enforced in enterprise environments on Chrome OS. Can NOT be overridden. The source of a policy is determined when it's first set. For cloud policies, this would be the decoding of the protocol buffers. Platform policies are usually set by loading platform-specific local configurations like entries in the Windows registry. Enterprise defaults are automatically set if the device is active in an enterprise environment. Enterprise override policies are set within the code to enforce specific behaviors (like ash tray visibility). They cannot be overridden. BUG=506123 TBR=jam@chromium.org Committed: https://crrev.com/92e7960f06c2ac2ec0113bb88df3d322f0eb97fe Cr-Commit-Position: refs/heads/master@{#349654} Review URL: https://codereview.chromium.org/1304843004 Cr-Commit-Position: refs/heads/master@{#349749}
Diffstat (limited to 'components/sync_driver/sync_policy_handler_unittest.cc')
-rw-r--r--components/sync_driver/sync_policy_handler_unittest.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/sync_driver/sync_policy_handler_unittest.cc b/components/sync_driver/sync_policy_handler_unittest.cc
index e0f2c0d..2d95ec1 100644
--- a/components/sync_driver/sync_policy_handler_unittest.cc
+++ b/components/sync_driver/sync_policy_handler_unittest.cc
@@ -5,6 +5,7 @@
#include "base/prefs/pref_value_map.h"
#include "base/values.h"
#include "components/policy/core/common/policy_map.h"
+#include "components/policy/core/common/policy_types.h"
#include "components/sync_driver/pref_names.h"
#include "components/sync_driver/sync_policy_handler.h"
#include "policy/policy_constants.h"
@@ -28,6 +29,7 @@ TEST_F(SyncPolicyHandlerTest, Enabled) {
policy.Set(policy::key::kSyncDisabled,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD,
new base::FundamentalValue(false),
NULL);
SyncPolicyHandler handler;
@@ -43,6 +45,7 @@ TEST_F(SyncPolicyHandlerTest, Disabled) {
policy.Set(policy::key::kSyncDisabled,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD,
new base::FundamentalValue(true),
NULL);
SyncPolicyHandler handler;