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

Unified Diff: tools/json_schema_compiler/test/functions_on_types_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: tools/json_schema_compiler/test/functions_on_types_unittest.cc
diff --git a/tools/json_schema_compiler/test/functions_on_types_unittest.cc b/tools/json_schema_compiler/test/functions_on_types_unittest.cc
index 71674854a495f9289c4053c8826214776bbd3698..4aa77ed8bb3f1e3fc14f8130eca43d3ea45ff169 100644
--- a/tools/json_schema_compiler/test/functions_on_types_unittest.cc
+++ b/tools/json_schema_compiler/test/functions_on_types_unittest.cc
@@ -2,9 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "tools/json_schema_compiler/test/functions_on_types.h"
+
+#include <utility>
+
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "tools/json_schema_compiler/test/functions_on_types.h"
using namespace test::api::functions_on_types;
@@ -64,7 +67,7 @@ TEST(JsonSchemaCompilerFunctionsOnTypesTest, ChromeSettingGetParamsCreate) {
new base::DictionaryValue());
details_value->SetBoolean("incognito", true);
std::unique_ptr<base::ListValue> params_value(new base::ListValue());
- params_value->Append(details_value.release());
+ params_value->Append(std::move(details_value));
std::unique_ptr<ChromeSetting::Get::Params> params(
ChromeSetting::Get::Params::Create(*params_value));
EXPECT_TRUE(params.get());

Powered by Google App Engine
This is Rietveld 408576698