Commit 8d0b1e09 authored by Yann Dago's avatar Yann Dago Committed by Chromium LUCI CQ

Migrated policies should have a warning instead of an error

Inclusive policies that have values because their older deprecated
value has been migrated programmatically should not be in error, they
should be in a warning state.

Visual: http://screen/4XmySdAwkiTuor5

Bug: 1033069
Change-Id: I48a481ef60207516102f739a942a8c12093a980c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611548Reviewed-by: default avatarJulian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Yann Dago <ydago@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841157}
parent e511e487
...@@ -143,8 +143,8 @@ void RemapRenamedPolicies(PolicyMap* policies) { ...@@ -143,8 +143,8 @@ void RemapRenamedPolicies(PolicyMap* policies) {
if (old_policy && if (old_policy &&
(!new_policy || old_policy->has_higher_priority_than(*new_policy))) { (!new_policy || old_policy->has_higher_priority_than(*new_policy))) {
PolicyMap::Entry policy_entry = old_policy->DeepCopy(); PolicyMap::Entry policy_entry = old_policy->DeepCopy();
policy_entry.AddError(IDS_POLICY_MIGRATED_NEW_POLICY, policy_entry.AddWarning(IDS_POLICY_MIGRATED_NEW_POLICY,
{base::UTF8ToUTF16(policy_pair.first)}); {base::UTF8ToUTF16(policy_pair.first)});
old_policy->AddError(IDS_POLICY_MIGRATED_OLD_POLICY, old_policy->AddError(IDS_POLICY_MIGRATED_OLD_POLICY,
{base::UTF8ToUTF16(policy_pair.second)}); {base::UTF8ToUTF16(policy_pair.second)});
policies->Set(policy_pair.second, std::move(policy_entry)); policies->Set(policy_pair.second, std::move(policy_entry));
......
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