diff options
author | limasdf <limasdf@gmail.com> | 2015-12-19 04:04:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-19 12:06:04 +0000 |
commit | 21d67e679792a286c581f20ea8e4848b9c34061e (patch) | |
tree | dc6783b7a0229c79e3a8514293fc874eb0fa4789 /extensions/common/features | |
parent | 49f72db8dbff60fb22dfddf09dddeffe54f674db (diff) | |
download | chromium_src-21d67e679792a286c581f20ea8e4848b9c34061e.zip chromium_src-21d67e679792a286c581f20ea8e4848b9c34061e.tar.gz chromium_src-21d67e679792a286c581f20ea8e4848b9c34061e.tar.bz2 |
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}
Diffstat (limited to 'extensions/common/features')
-rw-r--r-- | extensions/common/features/base_feature_provider_unittest.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/extensions/common/features/base_feature_provider_unittest.cc b/extensions/common/features/base_feature_provider_unittest.cc index 30850a3..43e0ce2 100644 --- a/extensions/common/features/base_feature_provider_unittest.cc +++ b/extensions/common/features/base_feature_provider_unittest.cc @@ -46,10 +46,10 @@ TEST(BaseFeatureProviderTest, ManifestFeatureAvailability) { scoped_refptr<const Extension> extension = ExtensionBuilder() - .SetManifest(DictionaryBuilder() - .Set("name", "test extension") - .Set("version", "1") - .Set("description", "hello there")) + .SetManifest(std::move(DictionaryBuilder() + .Set("name", "test extension") + .Set("version", "1") + .Set("description", "hello there"))) .Build(); ASSERT_TRUE(extension.get()); @@ -100,16 +100,17 @@ TEST(BaseFeatureProviderTest, PermissionFeatureAvailability) { scoped_refptr<const Extension> app = ExtensionBuilder() - .SetManifest( + .SetManifest(std::move( DictionaryBuilder() .Set("name", "test app") .Set("version", "1") - .Set("app", DictionaryBuilder().Set( + .Set("app", std::move(DictionaryBuilder().Set( "background", - DictionaryBuilder().Set( + std::move(DictionaryBuilder().Set( "scripts", std::move(ListBuilder().Append( - "background.js"))))) - .Set("permissions", std::move(ListBuilder().Append("power")))) + "background.js"))))))) + .Set("permissions", + std::move(ListBuilder().Append("power"))))) .Build(); ASSERT_TRUE(app.get()); ASSERT_TRUE(app->is_platform_app()); |