summaryrefslogtreecommitdiffstats
path: root/extensions/common/test_util.cc
diff options
context:
space:
mode:
authorlimasdf <limasdf@gmail.com>2015-12-17 17:36:16 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-18 01:37:16 +0000
commit704a902182dd1ba3b315563a6a65a7eb107ece79 (patch)
tree584e650445eed56fef7a5dd4693e55ed90bf56e0 /extensions/common/test_util.cc
parenta960829376718133c93b1699a997b875e538a262 (diff)
downloadchromium_src-704a902182dd1ba3b315563a6a65a7eb107ece79.zip
chromium_src-704a902182dd1ba3b315563a6a65a7eb107ece79.tar.gz
chromium_src-704a902182dd1ba3b315563a6a65a7eb107ece79.tar.bz2
Use rvalue reference instead of ExtensionBuilder::pass()
C++ 11 enables rvalue reference with std::move() so that removing legacy ListBuilder::Pass(). BUG=563649 TBR=thankis@chromium.org Review URL: https://codereview.chromium.org/1511103003 Cr-Commit-Position: refs/heads/master@{#365969}
Diffstat (limited to 'extensions/common/test_util.cc')
-rw-r--r--extensions/common/test_util.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/extensions/common/test_util.cc b/extensions/common/test_util.cc
index 9a9312a..eb857fd 100644
--- a/extensions/common/test_util.cc
+++ b/extensions/common/test_util.cc
@@ -13,16 +13,16 @@
namespace extensions {
namespace test_util {
-ExtensionBuilder& BuildExtension(ExtensionBuilder& builder) {
- return builder
- .SetManifest(DictionaryBuilder()
- .Set("name", "Test extension")
- .Set("version", "1.0")
- .Set("manifest_version", 2));
+ExtensionBuilder BuildExtension(ExtensionBuilder builder) {
+ builder.SetManifest(DictionaryBuilder()
+ .Set("name", "Test extension")
+ .Set("version", "1.0")
+ .Set("manifest_version", 2));
+ return builder;
}
-ExtensionBuilder& BuildApp(ExtensionBuilder& builder) {
- return builder.SetManifest(
+ExtensionBuilder BuildApp(ExtensionBuilder builder) {
+ builder.SetManifest(
DictionaryBuilder()
.Set("name", "Test extension")
.Set("version", "1.0")
@@ -33,6 +33,7 @@ ExtensionBuilder& BuildApp(ExtensionBuilder& builder) {
extensions::DictionaryBuilder().Set(
"scripts", std::move(extensions::ListBuilder().Append(
"background.js"))))));
+ return builder;
}
scoped_refptr<Extension> CreateEmptyExtension() {