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

Unified Diff: chromecast/crash/linux/crash_testing_utils.cc

Issue 2000803003: Use std::unique_ptr for base::DictionaryValue and base::ListValue's internal store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 4 years, 7 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
« no previous file with comments | « chrome/utility/importer/nss_decryptor.cc ('k') | chromecast/crash/linux/synchronized_minidump_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/crash/linux/crash_testing_utils.cc
diff --git a/chromecast/crash/linux/crash_testing_utils.cc b/chromecast/crash/linux/crash_testing_utils.cc
index 7b10a8633e984461c982d59f927badb728a9b4ed..19aed15178fc3aa4b0d86e5471d15dd259b8663e 100644
--- a/chromecast/crash/linux/crash_testing_utils.cc
+++ b/chromecast/crash/linux/crash_testing_utils.cc
@@ -63,7 +63,7 @@ int WriteLockFile(const std::string& path, base::ListValue* contents) {
DCHECK(contents);
std::string lockfile;
- for (const base::Value* elem : *contents) {
+ for (const auto& elem : *contents) {
std::unique_ptr<std::string> dump_info = SerializeToJson(*elem);
RCHECK(dump_info, -1, "Failed to serialize DumpInfo");
lockfile += *dump_info;
@@ -95,8 +95,8 @@ bool FetchDumps(const std::string& lockfile_path,
dumps->clear();
- for (base::Value* elem : *dump_list) {
- std::unique_ptr<DumpInfo> dump = base::WrapUnique(new DumpInfo(elem));
+ for (const auto& elem : *dump_list) {
+ std::unique_ptr<DumpInfo> dump(new DumpInfo(elem.get()));
RCHECK(dump->valid(), false, "Invalid DumpInfo");
dumps->push_back(std::move(dump));
}
« no previous file with comments | « chrome/utility/importer/nss_decryptor.cc ('k') | chromecast/crash/linux/synchronized_minidump_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698