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}
diff --git a/chrome/browser/extensions/test_extension_environment.cc b/chrome/browser/extensions/test_extension_environment.cc
index a85b5d4..37f5628 100644
--- a/chrome/browser/extensions/test_extension_environment.cc
+++ b/chrome/browser/extensions/test_extension_environment.cc
@@ -60,11 +60,14 @@
.Set("name", "Test App Name")
.Set("version", "2.0")
.Set("manifest_version", 2)
- .Set("app", std::move(extensions::DictionaryBuilder().Set(
- "background",
- std::move(extensions::DictionaryBuilder().Set(
- "scripts", std::move(extensions::ListBuilder().Append(
- "background.js")))))))
+ .Set("app", extensions::DictionaryBuilder()
+ .Set("background",
+ extensions::DictionaryBuilder()
+ .Set("scripts", extensions::ListBuilder()
+ .Append("background.js")
+ .Build())
+ .Build())
+ .Build())
.Build();
}