summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsfeuz@chromium.org <sfeuz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-20 16:09:15 +0000
committersfeuz@chromium.org <sfeuz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-20 16:09:15 +0000
commit93245ec83138fa8b52e7e46212b82cd7a542fa95 (patch)
tree061f7dffd25f7eaeea1ef626e7a923f96bf3a97a /chrome
parent2a023ab22ac143c9ab37dab516f31737d68756c5 (diff)
downloadchromium_src-93245ec83138fa8b52e7e46212b82cd7a542fa95.zip
chromium_src-93245ec83138fa8b52e7e46212b82cd7a542fa95.tar.gz
chromium_src-93245ec83138fa8b52e7e46212b82cd7a542fa95.tar.bz2
Adding DeviceOnly capabilities to policy_template file.
We need a Policy <-> Preference matching for policies, which will only be distributed via DeviceCloudPolicy. One user of this will be the device policy refresh rate, which currently uses the same policy as the user policy refresh rate. Review URL: http://codereview.chromium.org/7056008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/policy/policy_templates.json6
-rw-r--r--chrome/tools/build/generate_policy_source.py4
2 files changed, 10 insertions, 0 deletions
diff --git a/chrome/app/policy/policy_templates.json b/chrome/app/policy/policy_templates.json
index d6101c0..b86fdb4 100644
--- a/chrome/app/policy/policy_templates.json
+++ b/chrome/app/policy/policy_templates.json
@@ -103,6 +103,12 @@
# $3 -> Google Chrome Frame / Chromium Frame
# $6 is reserved for doc_writer
#
+# Device Policy:
+# An additional flag device_only (optional, defaults to False) indicates
+# that this policy is only supported as a device-level Cloud Policy.
+# In that case no entry in the UserPolicy Protobuf is generated and
+# it is assumed that it will be added to the DevicePolicy Protobuf manually.
+#
'policy_definitions': [
{
'name': 'Homepage',
diff --git a/chrome/tools/build/generate_policy_source.py b/chrome/tools/build/generate_policy_source.py
index 4de4fef..9ee8083 100644
--- a/chrome/tools/build/generate_policy_source.py
+++ b/chrome/tools/build/generate_policy_source.py
@@ -186,6 +186,8 @@ RESERVED_IDS = 2
def _WritePolicyProto(file, policy, fields):
+ if policy.get('device_only', False):
+ return
file.write('message %sProto {\n' % policy['name'])
file.write(' optional PolicyOptions policy_options = 1;\n')
file.write(' optional %s %s = 2;\n' %
@@ -283,6 +285,8 @@ def _CreateValue(type):
def _WritePolicyCode(file, policy):
+ if policy.get('device_only', False):
+ return
membername = policy['name'].lower()
proto_type = "%sProto" % policy['name']
proto_name = "%s_proto" % membername