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

Unified Diff: chromecast/crash/linux/synchronized_minidump_manager.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 | « chromecast/crash/linux/crash_testing_utils.cc ('k') | chromeos/network/network_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/crash/linux/synchronized_minidump_manager.cc
diff --git a/chromecast/crash/linux/synchronized_minidump_manager.cc b/chromecast/crash/linux/synchronized_minidump_manager.cc
index 46d06f5354c7fab569b261489722c639b9a806c3..523916d349b896cd297d461697e2efae350b3e7d 100644
--- a/chromecast/crash/linux/synchronized_minidump_manager.cc
+++ b/chromecast/crash/linux/synchronized_minidump_manager.cc
@@ -292,7 +292,7 @@ int SynchronizedMinidumpManager::WriteFiles(const base::ListValue* dumps,
DCHECK(metadata);
std::string lockfile;
- for (const base::Value* elem : *dumps) {
+ for (const auto& elem : *dumps) {
std::unique_ptr<std::string> dump_info = SerializeToJson(*elem);
RCHECK(dump_info, -1);
lockfile += *dump_info;
@@ -364,8 +364,8 @@ void SynchronizedMinidumpManager::ReleaseLockFile() {
ScopedVector<DumpInfo> SynchronizedMinidumpManager::GetDumps() {
ScopedVector<DumpInfo> dumps;
- for (const base::Value* elem : *dumps_) {
- dumps.push_back(new DumpInfo(elem));
+ for (const auto& elem : *dumps_) {
+ dumps.push_back(new DumpInfo(elem.get()));
}
return dumps;
« no previous file with comments | « chromecast/crash/linux/crash_testing_utils.cc ('k') | chromeos/network/network_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698