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

Unified Diff: components/browser_sync/browser/profile_sync_service.cc

Issue 2051663003: base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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: components/browser_sync/browser/profile_sync_service.cc
diff --git a/components/browser_sync/browser/profile_sync_service.cc b/components/browser_sync/browser/profile_sync_service.cc
index 7e3cb1ba43ab9ac097004de5869a14a5ebdf7ac1..9c6c3ae85560d16c5847c9fa72a9b38e3a88f088 100644
--- a/components/browser_sync/browser/profile_sync_service.cc
+++ b/components/browser_sync/browser/profile_sync_service.cc
@@ -1893,7 +1893,7 @@ base::Value* ProfileSyncService::GetTypeStatusMap() const {
type_status_header->SetString("value", "Group Type");
type_status_header->SetString("num_entries", "Total Entries");
type_status_header->SetString("num_live", "Live Entries");
- result->Append(type_status_header.release());
+ result->Append(std::move(type_status_header));
std::unique_ptr<base::DictionaryValue> type_status;
for (ModelTypeSet::Iterator it = registered.First(); it.Good(); it.Inc()) {
@@ -1950,7 +1950,7 @@ base::Value* ProfileSyncService::GetTypeStatusMap() const {
detailed_status.num_entries_by_type[type]);
type_status->SetInteger("num_live", live_count);
- result->Append(type_status.release());
+ result->Append(std::move(type_status));
}
return result.release();
}
@@ -2270,7 +2270,7 @@ void GetAllNodesRequestHelper::OnReceivedNodesForTypes(
new base::DictionaryValue());
type_dict->SetString("type", ModelTypeToString(type));
type_dict->Set("nodes", node_list);
- result_accumulator_->Append(type_dict.release());
+ result_accumulator_->Append(std::move(type_dict));
// Remember that this part of the request is satisfied.
awaiting_types_.Remove(type);

Powered by Google App Engine
This is Rietveld 408576698