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

Unified Diff: chrome/browser/ui/webui/options/certificate_manager_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/options/certificate_manager_handler.cc
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index e4c42f4fd52a246abfdba99ecde8fffec73e573c..91f5f9f50d1717e92eead104cf5b116617b81179 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -1144,7 +1144,7 @@ void CertificateManagerHandler::PopulateTree(
dict->SetString(kNameId, 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(
@@ -1175,7 +1175,7 @@ void CertificateManagerHandler::PopulateTree(
}
std::sort(subnodes->begin(), subnodes->end(), comparator);
- dict->Set(kSubNodesId, subnodes);
+ dict->Set(kSubNodesId, std::move(subnodes));
nodes->Append(std::move(dict));
}
std::sort(nodes->begin(), nodes->end(), comparator);

Powered by Google App Engine
This is Rietveld 408576698