Index: chrome/browser/component_updater/supervised_user_whitelist_installer.cc |
diff --git a/chrome/browser/component_updater/supervised_user_whitelist_installer.cc b/chrome/browser/component_updater/supervised_user_whitelist_installer.cc |
index dcb569fe862ef7e82e56b19c573e4f13b64aa3e3..73e0a94e43e3dfa36f5ae86b4377ab7f79cd9359 100644 |
--- a/chrome/browser/component_updater/supervised_user_whitelist_installer.cc |
+++ b/chrome/browser/component_updater/supervised_user_whitelist_installer.cc |
@@ -533,26 +533,24 @@ |
DictionaryPrefUpdate update(local_state_, |
prefs::kRegisteredSupervisedUserWhitelists); |
base::DictionaryValue* pref_dict = update.Get(); |
- base::DictionaryValue* whitelist_dict_weak = nullptr; |
- const bool newly_added = !pref_dict->GetDictionaryWithoutPathExpansion( |
- crx_id, &whitelist_dict_weak); |
+ base::DictionaryValue* whitelist_dict = nullptr; |
+ const bool newly_added = |
+ !pref_dict->GetDictionaryWithoutPathExpansion(crx_id, &whitelist_dict); |
if (newly_added) { |
- auto whitelist_dict = base::MakeUnique<base::DictionaryValue>(); |
- whitelist_dict_weak = whitelist_dict.get(); |
+ whitelist_dict = new base::DictionaryValue; |
whitelist_dict->SetString(kName, name); |
- pref_dict->SetWithoutPathExpansion(crx_id, std::move(whitelist_dict)); |
+ pref_dict->SetWithoutPathExpansion(crx_id, whitelist_dict); |
} |
if (!client_id.empty()) { |
- base::ListValue* clients_weak = nullptr; |
- if (!whitelist_dict_weak->GetList(kClients, &clients_weak)) { |
+ base::ListValue* clients = nullptr; |
+ if (!whitelist_dict->GetList(kClients, &clients)) { |
DCHECK(newly_added); |
- auto clients = base::MakeUnique<base::ListValue>(); |
- clients_weak = clients.get(); |
- whitelist_dict_weak->Set(kClients, std::move(clients)); |
+ clients = new base::ListValue; |
+ whitelist_dict->Set(kClients, clients); |
} |
- bool success = clients_weak->AppendIfNotPresent( |
- base::MakeUnique<base::Value>(client_id)); |
+ bool success = |
+ clients->AppendIfNotPresent(base::MakeUnique<base::Value>(client_id)); |
DCHECK(success); |
} |
@@ -560,7 +558,7 @@ |
// Sanity-check that the stored name is equal to the name passed in. |
// In release builds this is a no-op. |
std::string stored_name; |
- DCHECK(whitelist_dict_weak->GetString(kName, &stored_name)); |
+ DCHECK(whitelist_dict->GetString(kName, &stored_name)); |
DCHECK_EQ(stored_name, name); |
return; |
} |