diff options
author | limasdf <limasdf@gmail.com> | 2015-12-08 19:58:45 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-09 03:59:36 +0000 |
commit | 3d1025433fba150119ec1519f9228f2febddd55c (patch) | |
tree | 1b00bc3d0334a7c624d7e49043182a6a9d6dd605 /extensions/browser/mojo | |
parent | 9679230bb637a8aeca7598d08da802b1c64404fe (diff) | |
download | chromium_src-3d1025433fba150119ec1519f9228f2febddd55c.zip chromium_src-3d1025433fba150119ec1519f9228f2febddd55c.tar.gz chromium_src-3d1025433fba150119ec1519f9228f2febddd55c.tar.bz2 |
Use rvalue reference instead of extensions::ListBuilder::Pass()
C++ 11 enables rvalue reference with std::move() so that removing legacy ListBuilder::Pass() stuff.
TEST=unit_tests
BUG=563649
TBR=thakis@chromium.org
Review URL: https://codereview.chromium.org/1497753002
Cr-Commit-Position: refs/heads/master@{#363970}
Diffstat (limited to 'extensions/browser/mojo')
-rw-r--r-- | extensions/browser/mojo/keep_alive_impl_unittest.cc | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/extensions/browser/mojo/keep_alive_impl_unittest.cc b/extensions/browser/mojo/keep_alive_impl_unittest.cc index 0268358..72e61b36 100644 --- a/extensions/browser/mojo/keep_alive_impl_unittest.cc +++ b/extensions/browser/mojo/keep_alive_impl_unittest.cc @@ -4,6 +4,8 @@ #include "extensions/browser/mojo/keep_alive_impl.h" +#include <utility> + #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "content/public/browser/notification_service.h" @@ -25,17 +27,16 @@ 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", - ListBuilder().Append("background.js"))))) + .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")))))) .SetID("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .Build(); } @@ -107,15 +108,15 @@ TEST_F(KeepAliveTest, UnloadExtension) { scoped_refptr<const Extension> other_extension = ExtensionBuilder() .SetManifest( - DictionaryBuilder() - .Set("name", "app") - .Set("version", "1") - .Set("manifest_version", 2) - .Set("app", DictionaryBuilder().Set( - "background", - DictionaryBuilder().Set( - "scripts", - ListBuilder().Append("background.js"))))) + 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")))))) .SetID("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb") .Build(); |