Index: chromeos/network/policy_util.cc |
diff --git a/chromeos/network/policy_util.cc b/chromeos/network/policy_util.cc |
index ebea93e02b28221da0e237f715118fb0890355af..a895881e52d80ea70a7e5530b28f67a8f324349f 100644 |
--- a/chromeos/network/policy_util.cc |
+++ b/chromeos/network/policy_util.cc |
@@ -7,6 +7,7 @@ |
#include <utility> |
#include "base/logging.h" |
+#include "base/memory/ptr_util.h" |
#include "base/values.h" |
#include "chromeos/network/network_profile.h" |
#include "chromeos/network/network_ui_data.h" |
@@ -164,8 +165,9 @@ base::DictionaryValue* GetOrCreateDictionary(const std::string& key, |
base::DictionaryValue* dict) { |
base::DictionaryValue* inner_dict = NULL; |
if (!dict->GetDictionaryWithoutPathExpansion(key, &inner_dict)) { |
- inner_dict = new base::DictionaryValue; |
- dict->SetWithoutPathExpansion(key, inner_dict); |
+ dict->SetWithoutPathExpansion(key, |
+ base::MakeUnique<base::DictionaryValue>()); |
+ dict->GetDictionaryWithoutPathExpansion(key, &inner_dict); |
} |
return inner_dict; |
} |