| Index: components/policy/core/common/policy_loader_win.cc
|
| diff --git a/components/policy/core/common/policy_loader_win.cc b/components/policy/core/common/policy_loader_win.cc
|
| index d739a038a030658d6779f0d55432bde312925cf1..022fdf2b7b9b6ae25909fc624f0b55fcc6ece1cd 100644
|
| --- a/components/policy/core/common/policy_loader_win.cc
|
| +++ b/components/policy/core/common/policy_loader_win.cc
|
| @@ -148,10 +148,9 @@ void FilterUntrustedPolicy(PolicyMap* policy) {
|
| return;
|
|
|
| std::unique_ptr<base::ListValue> filtered_values(new base::ListValue);
|
| - for (base::ListValue::const_iterator list_entry(policy_list_value->begin());
|
| - list_entry != policy_list_value->end(); ++list_entry) {
|
| + for (const auto& list_entry : *policy_list_value) {
|
| std::string entry;
|
| - if (!(*list_entry)->GetAsString(&entry))
|
| + if (!list_entry->GetAsString(&entry))
|
| continue;
|
| size_t pos = entry.find(';');
|
| if (pos == std::string::npos)
|
| @@ -166,10 +165,9 @@ void FilterUntrustedPolicy(PolicyMap* policy) {
|
| filtered_values->AppendString(entry);
|
| }
|
| if (invalid_policies) {
|
| - policy->Set(key::kExtensionInstallForcelist,
|
| - map_entry->level, map_entry->scope, map_entry->source,
|
| - filtered_values.release(),
|
| - map_entry->external_data_fetcher);
|
| + Entry filtered_entry = map_entry->DeepCopy();
|
| + filtered_entry.value = std::move(filtered_values);
|
| + policy->Set(key::kExtensionInstallForcelist, std::move(filtered_entry));
|
|
|
| const PolicyDetails* details = GetChromePolicyDetails(
|
| key::kExtensionInstallForcelist);
|
|
|