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

Unified Diff: chrome/browser/ui/webui/options/password_manager_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: chrome/browser/ui/webui/options/password_manager_handler.cc
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc
index c15af4656c18f012437ea3145e1b865ca63c70a0..6a5545690eaee7dfdfffb44f8af7ca251e6d8975 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/webui/options/password_manager_handler.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/command_line.h"
#include "base/feature_list.h"
@@ -283,7 +285,7 @@ void PasswordManagerHandler::SetPasswordList(
base::UTF8ToUTF16(saved_password->federation_origin.host())));
}
- entries.Append(entry.release());
+ entries.Append(std::move(entry));
}
web_ui()->CallJavascriptFunctionUnsafe(
@@ -297,7 +299,7 @@ void PasswordManagerHandler::SetPasswordExceptionList(
for (const auto& exception : password_exception_list) {
std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue);
CopyOriginInfoOfPasswordForm(*exception, entry.get());
- entries.Append(entry.release());
+ entries.Append(std::move(entry));
}
web_ui()->CallJavascriptFunctionUnsafe(

Powered by Google App Engine
This is Rietveld 408576698