Index: chrome/browser/safe_browsing/incident_reporting/platform_state_store.cc |
diff --git a/chrome/browser/safe_browsing/incident_reporting/platform_state_store.cc b/chrome/browser/safe_browsing/incident_reporting/platform_state_store.cc |
index 8da6f1930fb8eb3b08cadf222148041b1f68de08..813b5374519f4036721608a76512629229355dbe 100644 |
--- a/chrome/browser/safe_browsing/incident_reporting/platform_state_store.cc |
+++ b/chrome/browser/safe_browsing/incident_reporting/platform_state_store.cc |
@@ -16,6 +16,7 @@ |
#include "chrome/browser/safe_browsing/incident_reporting/platform_state_store.h" |
+#include "base/memory/ptr_util.h" |
#include "base/values.h" |
#if defined(USE_PLATFORM_STATE_STORE) |
@@ -115,8 +116,9 @@ void RestoreFromProtobuf( |
base::DictionaryValue* type_dict = nullptr; |
if (!value_dict->GetDictionaryWithoutPathExpansion(type_string, |
&type_dict)) { |
- type_dict = new base::DictionaryValue(); |
- value_dict->SetWithoutPathExpansion(type_string, type_dict); |
+ value_dict->SetWithoutPathExpansion( |
+ type_string, base::MakeUnique<base::DictionaryValue>()); |
+ value_dict->GetDictionaryWithoutPathExpansion(type_string, &type_dict); |
} |
RestoreOfTypeFromProtobuf(type_incidents.incidents().key_to_digest(), |
type_dict); |