summaryrefslogtreecommitdiffstats
path: root/extensions/browser/mojo
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2016-02-26 19:51:32 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-27 03:53:04 +0000
commit794d2bd77811b6d6b45048c19c287075cc9930db (patch)
treeef71bf3826d396a488ef0c72a68b3d7f4ff236d3 /extensions/browser/mojo
parent47dc6a8a0f7d36d20f90df5ac62da075d45bc9c3 (diff)
downloadchromium_src-794d2bd77811b6d6b45048c19c287075cc9930db.zip
chromium_src-794d2bd77811b6d6b45048c19c287075cc9930db.tar.gz
chromium_src-794d2bd77811b6d6b45048c19c287075cc9930db.tar.bz2
Make extensions::DictionaryBuilder and extensions::ListValue unmovable.
There's no reason for these classes to be movable. std::move() is just being used as a synonym for Build(). In addition: - Build() is fewer characters than std::move(). - clang-format works better when builder syntax is consistently used, which makes it easier for readers to visually match up deeply nested builders. - It's surprising to see std::move() used with what looks like a temporary. BUG=none Review URL: https://codereview.chromium.org/1739183003 Cr-Commit-Position: refs/heads/master@{#378107}
Diffstat (limited to 'extensions/browser/mojo')
-rw-r--r--extensions/browser/mojo/keep_alive_impl_unittest.cc35
1 files changed, 22 insertions, 13 deletions
diff --git a/extensions/browser/mojo/keep_alive_impl_unittest.cc b/extensions/browser/mojo/keep_alive_impl_unittest.cc
index c1f4810..5d640e0 100644
--- a/extensions/browser/mojo/keep_alive_impl_unittest.cc
+++ b/extensions/browser/mojo/keep_alive_impl_unittest.cc
@@ -28,17 +28,21 @@ class KeepAliveTest : public ExtensionsTest {
message_loop_.reset(new base::MessageLoop);
extension_ =
ExtensionBuilder()
- .SetManifest(std::move(
+ .SetManifest(
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")))))))))
+ .Set("app", DictionaryBuilder()
+ .Set("background",
+ DictionaryBuilder()
+ .Set("scripts",
+ ListBuilder()
+ .Append("background.js")
+ .Build())
+ .Build())
+ .Build())
+ .Build())
.SetID("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
.Build();
}
@@ -110,16 +114,21 @@ TEST_F(KeepAliveTest, UnloadExtension) {
scoped_refptr<const Extension> other_extension =
ExtensionBuilder()
- .SetManifest(std::move(
+ .SetManifest(
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")))))))))
+ .Set("app",
+ DictionaryBuilder()
+ .Set("background",
+ DictionaryBuilder()
+ .Set("scripts", ListBuilder()
+ .Append("background.js")
+ .Build())
+ .Build())
+ .Build())
+ .Build())
.SetID("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")
.Build();