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

Unified Diff: chrome/browser/ui/webui/settings/certificates_handler.cc

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: Rebased 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/ui/webui/settings/certificates_handler.cc
diff --git a/chrome/browser/ui/webui/settings/certificates_handler.cc b/chrome/browser/ui/webui/settings/certificates_handler.cc
index d80b14b987706f3e31fc202c966e237012594c7c..25500d504d7be589e223fe0e042ca77d230831d2 100644
--- a/chrome/browser/ui/webui/settings/certificates_handler.cc
+++ b/chrome/browser/ui/webui/settings/certificates_handler.cc
@@ -1043,7 +1043,7 @@ void CertificatesHandler::PopulateTree(
dict->SetString(kNameField, i->first);
// Populate second level (certs).
- base::ListValue* subnodes = new base::ListValue;
+ auto subnodes = base::MakeUnique<base::ListValue>();
for (net::CertificateList::const_iterator org_cert_it = i->second.begin();
org_cert_it != i->second.end(); ++org_cert_it) {
std::unique_ptr<base::DictionaryValue> cert_dict(
@@ -1075,7 +1075,7 @@ void CertificatesHandler::PopulateTree(
}
std::sort(subnodes->begin(), subnodes->end(), comparator);
- dict->Set(kSubnodesField, subnodes);
+ dict->Set(kSubnodesField, std::move(subnodes));
nodes->Append(std::move(dict));
}
std::sort(nodes->begin(), nodes->end(), comparator);

Powered by Google App Engine
This is Rietveld 408576698