summaryrefslogtreecommitdiffstats
path: root/extensions/common/test_util.cc
diff options
context:
space:
mode:
authorlimasdf <limasdf@gmail.com>2015-12-19 04:04:49 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-19 12:06:04 +0000
commit21d67e679792a286c581f20ea8e4848b9c34061e (patch)
treedc6783b7a0229c79e3a8514293fc874eb0fa4789 /extensions/common/test_util.cc
parent49f72db8dbff60fb22dfddf09dddeffe54f674db (diff)
downloadchromium_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/test_util.cc')
-rw-r--r--extensions/common/test_util.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/extensions/common/test_util.cc b/extensions/common/test_util.cc
index eb857fd..e3775e5 100644
--- a/extensions/common/test_util.cc
+++ b/extensions/common/test_util.cc
@@ -14,39 +14,39 @@ namespace extensions {
namespace test_util {
ExtensionBuilder BuildExtension(ExtensionBuilder builder) {
- builder.SetManifest(DictionaryBuilder()
- .Set("name", "Test extension")
- .Set("version", "1.0")
- .Set("manifest_version", 2));
+ builder.SetManifest(std::move(DictionaryBuilder()
+ .Set("name", "Test extension")
+ .Set("version", "1.0")
+ .Set("manifest_version", 2)));
return builder;
}
ExtensionBuilder BuildApp(ExtensionBuilder builder) {
- builder.SetManifest(
+ builder.SetManifest(std::move(
DictionaryBuilder()
.Set("name", "Test extension")
.Set("version", "1.0")
.Set("manifest_version", 2)
.Set("app",
- extensions::DictionaryBuilder().Set(
+ std::move(extensions::DictionaryBuilder().Set(
"background",
- extensions::DictionaryBuilder().Set(
+ std::move(extensions::DictionaryBuilder().Set(
"scripts", std::move(extensions::ListBuilder().Append(
- "background.js"))))));
+ "background.js")))))))));
return builder;
}
scoped_refptr<Extension> CreateEmptyExtension() {
return ExtensionBuilder()
- .SetManifest(
- DictionaryBuilder().Set("name", "Test").Set("version", "1.0"))
+ .SetManifest(std::move(
+ DictionaryBuilder().Set("name", "Test").Set("version", "1.0")))
.Build();
}
scoped_refptr<Extension> CreateEmptyExtension(const std::string& id) {
return ExtensionBuilder()
- .SetManifest(
- DictionaryBuilder().Set("name", "test").Set("version", "0.1"))
+ .SetManifest(std::move(
+ DictionaryBuilder().Set("name", "test").Set("version", "0.1")))
.SetID(id)
.Build();
}