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

Unified Diff: chrome/browser/extensions/api/management/management_api_unittest.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/management/management_api_unittest.cc
diff --git a/chrome/browser/extensions/api/management/management_api_unittest.cc b/chrome/browser/extensions/api/management/management_api_unittest.cc
index 8c0fad4cef66fd4bf67d6b1f40e99008a848c0c8..9fd8a426b00b05198170593efb0646c7a94954ec 100644
--- a/chrome/browser/extensions/api/management/management_api_unittest.cc
+++ b/chrome/browser/extensions/api/management/management_api_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <memory>
+#include <utility>
#include "base/macros.h"
#include "base/memory/ptr_util.h"
@@ -197,7 +198,7 @@ TEST_F(ManagementApiUnitTest, ManagementUninstall) {
// Try again, using showConfirmDialog: false.
std::unique_ptr<base::DictionaryValue> options(new base::DictionaryValue());
options->SetBoolean("showConfirmDialog", false);
- uninstall_args.Append(options.release());
+ uninstall_args.Append(std::move(options));
function = new ManagementUninstallFunction();
EXPECT_TRUE(registry()->enabled_extensions().Contains(extension_id));
EXPECT_FALSE(RunFunction(function, uninstall_args));

Powered by Google App Engine
This is Rietveld 408576698