commit | 500d12be39b357b06f0c7fc9c8f18179cbabad10 | [log] [tgz] |
---|---|---|
author | Kateryna Koval <kkateryna@google.com> | Thu Oct 16 13:28:27 2025 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Oct 16 13:31:50 2025 |
tree | 2fdc85703d1f72dcc3820ceb2bee016d8c2b8951 | |
parent | 4f50365744a7c03f6e772572df1f0f43d45d8373 [diff] |
Clarify alternative naming for kernel key version in a comment. Add a comment to note that "kernel key version" is also referred to as "rollback protection version". This is intended to prevent confusion, as the term "rollback protection version" is used on the server-side. Change-Id: Ibd82df60d9d89206fc414a07372291cdb34ddc27 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7041602 Reviewed-by: Artem Sumaneev <asumaneev@google.com> Reviewed-by: Igor <igorcov@chromium.org> Commit-Queue: Kateryna Koval <kkateryna@google.com> Cr-Commit-Position: refs/heads/main@{#1530795} NOKEYCHECK=True GitOrigin-RevId: 60473c8a738d096abbe3cf0ea719b89eb25ed7b3
This directory contains proto definitions for communication with the device management server.
There are two protocol buffers defining the messages for user policies - chrome_settings.proto
and cloud_policy.proto
. Both files are auto-generated by the generate_policy_source.py script from policy_templates.json, which in turn is auto-generated from the individual policy yaml files in policy_definitions. This is all done as part of building Chrome.
The reason there are two files is a compromise between readability and performance.
chrome_settings.proto
This file lists all non-device policies including comments containing their detailed descriptions. Additionally every policy in this file has a distinct message type. For example, this is the message for the HomepageLocation
policy:
message HomepageLocationProto { optional PolicyOptions policy_options = 1; optional string HomepageLocation = 2; }
cloud_policy.proto
This file is generated for each target platform and it therefore contains only the policy messages that a certain platform supports. Additionally each field uses a generic type defined in policy_common_definitions.proto. For example this is the message for any string policy:
message StringPolicyProto { optional PolicyOptions policy_options = 1; optional string value = 2; }
The client code for each platform uses the more compact cloud_policy.proto
to parse the policy blobs it receives from the device management server. On the other hand, the device management server needs to know of all the policies that exist for all the platforms, therefore chrome_settings.proto
is what the server code uses.
The two files are compatible and when the messages are serialized their binary content is equivalent. CloudPolicyProtoTest.VerifyProtobufEquivalence browser test makes sure that no regressions are introduced here.