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

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

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error 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/incident_reporting_service_unittest.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
index b3f927cec75ee52a82d8207fec8ace1ae11505c0..b9aa7b0a52e26746c5c211ec2bf2c53e6e5dd3a3 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
@@ -1313,12 +1313,13 @@ TEST_F(IncidentReportingServiceTest, CleanLegacyPruneState) {
// Set up a prune state dict with data to be cleared (and not).
std::unique_ptr<base::DictionaryValue> incidents_sent(
new base::DictionaryValue());
- base::DictionaryValue* type_dict = new base::DictionaryValue();
+ auto type_dict = base::MakeUnique<base::DictionaryValue>();
type_dict->SetStringWithoutPathExpansion("foo", "47");
- incidents_sent->SetWithoutPathExpansion(omnibox_type, type_dict);
- type_dict = new base::DictionaryValue();
+ incidents_sent->SetWithoutPathExpansion(omnibox_type, std::move(type_dict));
+ type_dict = base::MakeUnique<base::DictionaryValue>();
type_dict->SetStringWithoutPathExpansion("bar", "43");
- incidents_sent->SetWithoutPathExpansion(preference_type, type_dict);
+ incidents_sent->SetWithoutPathExpansion(preference_type,
+ std::move(type_dict));
// Add a profile.
Profile* profile =
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.cc ('k') | chrome/browser/safe_browsing/incident_reporting/platform_state_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698