From 21d67e679792a286c581f20ea8e4848b9c34061e Mon Sep 17 00:00:00 2001 From: limasdf Date: Sat, 19 Dec 2015 04:04:49 -0800 Subject: Use rvalue reference instead of extensions::DictionaryBuilder::pass() C++ 11 enables rvalue reference with std::move() so that removing DictionaryBuilder::Pass(). BUG=563649 TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1532193003 Cr-Commit-Position: refs/heads/master@{#366280} --- .../browser/mojo/keep_alive_impl_unittest.cc | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'extensions/browser/mojo') diff --git a/extensions/browser/mojo/keep_alive_impl_unittest.cc b/extensions/browser/mojo/keep_alive_impl_unittest.cc index 92bd9dd..7319875 100644 --- a/extensions/browser/mojo/keep_alive_impl_unittest.cc +++ b/extensions/browser/mojo/keep_alive_impl_unittest.cc @@ -27,16 +27,17 @@ class KeepAliveTest : public ExtensionsTest { message_loop_.reset(new base::MessageLoop); extension_ = ExtensionBuilder() - .SetManifest(DictionaryBuilder() - .Set("name", "app") - .Set("version", "1") - .Set("manifest_version", 2) - .Set("app", DictionaryBuilder().Set( - "background", - DictionaryBuilder().Set( - "scripts", - std::move(ListBuilder().Append( - "background.js")))))) + .SetManifest(std::move( + DictionaryBuilder() + .Set("name", "app") + .Set("version", "1") + .Set("manifest_version", 2) + .Set("app", + std::move(DictionaryBuilder().Set( + "background", + std::move(DictionaryBuilder().Set( + "scripts", std::move(ListBuilder().Append( + "background.js"))))))))) .SetID("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .Build(); } @@ -108,16 +109,16 @@ TEST_F(KeepAliveTest, UnloadExtension) { scoped_refptr other_extension = ExtensionBuilder() - .SetManifest( + .SetManifest(std::move( DictionaryBuilder() .Set("name", "app") .Set("version", "1") .Set("manifest_version", 2) - .Set("app", DictionaryBuilder().Set( + .Set("app", std::move(DictionaryBuilder().Set( "background", - DictionaryBuilder().Set( + std::move(DictionaryBuilder().Set( "scripts", std::move(ListBuilder().Append( - "background.js")))))) + "background.js"))))))))) .SetID("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb") .Build(); -- cgit v1.1