Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: chrome/browser/safe_browsing/incident_reporting/state_store.cc

Issue 2845113002: Remove raw base::DictionaryValue::SetWithoutPathExpansion in //chrome (Closed)
Patch Set: Replace Set/Get pairs by new Set Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..eb3a5a6615778754a8d4aa6d75191b7110e5f403 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,8 @@ 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);
+ type_dict = incidents_sent->SetDictionaryWithoutPathExpansion(
+ type_string, base::MakeUnique<base::DictionaryValue>());
}
type_dict->SetStringWithoutPathExpansion(key, base::UintToString(digest));
}

Powered by Google App Engine
This is Rietveld 408576698