Index: chrome/browser/safe_browsing/incident_reporting/state_store.cc |
diff --git a/chrome/browser/safe_browsing/incident_reporting/state_store.cc b/chrome/browser/safe_browsing/incident_reporting/state_store.cc |
index 52f1c15c919adf6d982fcadb6d14fbc5f397ccb7..f5684e1149ba0e9d6cd341c5580e18c2eee35a68 100644 |
--- a/chrome/browser/safe_browsing/incident_reporting/state_store.cc |
+++ b/chrome/browser/safe_browsing/incident_reporting/state_store.cc |
@@ -6,6 +6,7 @@ |
#include <utility> |
+#include "base/memory/ptr_util.h" |
#include "base/metrics/histogram_macros.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/values.h" |
@@ -42,8 +43,9 @@ void StateStore::Transaction::MarkAsReported(IncidentType type, |
base::DictionaryValue* type_dict = nullptr; |
if (!incidents_sent->GetDictionaryWithoutPathExpansion(type_string, |
&type_dict)) { |
- type_dict = new base::DictionaryValue(); |
- incidents_sent->SetWithoutPathExpansion(type_string, type_dict); |
+ incidents_sent->SetWithoutPathExpansion( |
+ type_string, base::MakeUnique<base::DictionaryValue>()); |
+ incidents_sent->GetDictionaryWithoutPathExpansion(type_string, &type_dict); |
} |
type_dict->SetStringWithoutPathExpansion(key, base::UintToString(digest)); |
} |