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

Unified Diff: components/policy/core/browser/configuration_policy_handler.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/policy/core/browser/configuration_policy_handler.cc
diff --git a/components/policy/core/browser/configuration_policy_handler.cc b/components/policy/core/browser/configuration_policy_handler.cc
index e90767a36722955f7e6748853c0a3d98f107df85..c7b3afa5b599f7b5424868fbe54ecfe153463699 100644
--- a/components/policy/core/browser/configuration_policy_handler.cc
+++ b/components/policy/core/browser/configuration_policy_handler.cc
@@ -216,7 +216,7 @@ bool StringMappingListPolicyHandler::Convert(const base::Value* input,
std::unique_ptr<base::Value> mapped_value = Map(entry_value);
if (mapped_value) {
if (output)
- output->Append(mapped_value.release());
+ output->Append(std::move(mapped_value));
} else {
if (errors) {
errors->AddError(policy_name(),

Powered by Google App Engine
This is Rietveld 408576698