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

Unified Diff: chrome/browser/extensions/api/identity/identity_api.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: chrome/browser/extensions/api/identity/identity_api.cc
diff --git a/chrome/browser/extensions/api/identity/identity_api.cc b/chrome/browser/extensions/api/identity/identity_api.cc
index 853fb7c5d254b885e01a3900003b7c3f9783ef99..b6bce398f0101227e6079f383a4d0687a653f7d9 100644
--- a/chrome/browser/extensions/api/identity/identity_api.cc
+++ b/chrome/browser/extensions/api/identity/identity_api.cc
@@ -300,7 +300,7 @@ ExtensionFunction::ResponseAction IdentityGetAccountsFunction::Run() {
++it) {
api::identity::AccountInfo account_info;
account_info.id = *it;
- infos->Append(account_info.ToValue().release());
+ infos->Append(account_info.ToValue());
}
return RespondNow(OneArgument(std::move(infos)));

Powered by Google App Engine
This is Rietveld 408576698