| Index: chrome/browser/supervised_user/supervised_user_settings_service.cc
|
| diff --git a/chrome/browser/supervised_user/supervised_user_settings_service.cc b/chrome/browser/supervised_user/supervised_user_settings_service.cc
|
| index e841bc7007d093ed05f246c31a26ddb7c3eddd00..c75a279f3f04630f0bf3123dd5dde0535b6ac141 100644
|
| --- a/chrome/browser/supervised_user/supervised_user_settings_service.cc
|
| +++ b/chrome/browser/supervised_user/supervised_user_settings_service.cc
|
| @@ -454,9 +454,9 @@ base::DictionaryValue* SupervisedUserSettingsService::GetDictionaryAndSplitKey(
|
| std::string prefix = key->substr(0, pos);
|
| base::DictionaryValue* dict = nullptr;
|
| if (!split_settings->GetDictionary(prefix, &dict)) {
|
| - dict = new base::DictionaryValue;
|
| DCHECK(!split_settings->HasKey(prefix));
|
| - split_settings->Set(prefix, dict);
|
| + dict = split_settings->SetDictionary(
|
| + prefix, base::MakeUnique<base::DictionaryValue>());
|
| }
|
| key->erase(0, pos + 1);
|
| return dict;
|
| @@ -476,7 +476,7 @@ SupervisedUserSettingsService::GetSettings() {
|
| if (!SettingShouldApplyToPrefs(it.key()))
|
| continue;
|
|
|
| - settings->Set(it.key(), it.value().DeepCopy());
|
| + settings->Set(it.key(), base::MakeUnique<base::Value>(it.value()));
|
| }
|
|
|
| base::DictionaryValue* split_settings = GetSplitSettings();
|
| @@ -485,7 +485,7 @@ SupervisedUserSettingsService::GetSettings() {
|
| if (!SettingShouldApplyToPrefs(it.key()))
|
| continue;
|
|
|
| - settings->Set(it.key(), it.value().DeepCopy());
|
| + settings->Set(it.key(), base::MakeUnique<base::Value>(it.value()));
|
| }
|
|
|
| return settings;
|
|
|