Commit 01b26f76 authored by Martin Rodriguez's avatar Martin Rodriguez Committed by Commit Bot

Added metric for policy "device_id" field validity.

This metric extend cl/2047063. This allow to collect the same metrics
when policies are load from disk.

Bug: 653849
Change-Id: I044c8236be37d28ea43c94c508088faa7e5b6d64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422785
Commit-Queue: Martin Rodriguez <rodmartin@google.com>
Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811724}
parent 833cf4b9
......@@ -206,9 +206,14 @@ void DeviceCloudPolicyStoreChromeOS::UpdateFromService() {
if (service_status == chromeos::DeviceSettingsService::STORE_SUCCESS) {
policy_ = std::make_unique<em::PolicyData>();
const em::PolicyData* policy_data = device_settings_service_->policy_data();
if (policy_data)
if (policy_data) {
policy_->MergeFrom(*policy_data);
RecordDeviceIdValidityMetric(
"Enterprise.CachedDevicePolicyDeviceIdValidity", *policy_data,
*install_attributes_);
}
PolicyMap new_policy_map;
if (is_managed()) {
DecodeDevicePolicy(*device_settings_service_->device_settings(),
......
......@@ -170,6 +170,18 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<summary>URL fetcher status for auto-enrollment requests.</summary>
</histogram>
<histogram base="true" name="Enterprise.CachedDevicePolicyDeviceIdValidity"
enum="EnterprisePolicyDeviceIdValidity" expires_after="M95">
<owner>emaxx@chromium.org</owner>
<owner>rodmartin@chromium.org</owner>
<summary>
Result of the device ID validation in the device policy blob for those which
were loaded from disk. This validation happens on enrolled devices on
startup, on scheduled policy reloads that happen every few hours, and on
forced policy reloads.
</summary>
</histogram>
<histogram name="Enterprise.CBCMPolicyInvalidations"
enum="EnterprisePolicyInvalidations" expires_after="2021-06-16">
<owner>anthonyvd@google.com</owner>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment