summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_web_ui_unittest.cc
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 /chrome/browser/extensions/extension_web_ui_unittest.cc
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 'chrome/browser/extensions/extension_web_ui_unittest.cc')
-rw-r--r--chrome/browser/extensions/extension_web_ui_unittest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extension_web_ui_unittest.cc b/chrome/browser/extensions/extension_web_ui_unittest.cc
index 12cb23a..f75a531 100644
--- a/chrome/browser/extensions/extension_web_ui_unittest.cc
+++ b/chrome/browser/extensions/extension_web_ui_unittest.cc
@@ -77,10 +77,10 @@ TEST_F(ExtensionWebUITest, ExtensionURLOverride) {
manifest.Set(manifest_keys::kName, "ext1")
.Set(manifest_keys::kVersion, "0.1")
.Set(std::string(manifest_keys::kChromeURLOverrides),
- std::move(DictionaryBuilder().Set("bookmarks", kOverrideResource)));
+ DictionaryBuilder().Set("bookmarks", kOverrideResource).Build());
scoped_refptr<Extension> ext_unpacked(
ExtensionBuilder()
- .SetManifest(std::move(manifest))
+ .SetManifest(manifest.Build())
.SetLocation(Manifest::UNPACKED)
.SetID("abcdefghijabcdefghijabcdefghijaa")
.Build());
@@ -112,10 +112,10 @@ TEST_F(ExtensionWebUITest, ExtensionURLOverride) {
manifest2.Set(manifest_keys::kName, "ext2")
.Set(manifest_keys::kVersion, "0.1")
.Set(std::string(manifest_keys::kChromeURLOverrides),
- std::move(DictionaryBuilder().Set("bookmarks", kOverrideResource2)));
+ DictionaryBuilder().Set("bookmarks", kOverrideResource2).Build());
scoped_refptr<Extension> ext_component(
ExtensionBuilder()
- .SetManifest(std::move(manifest2))
+ .SetManifest(manifest2.Build())
.SetLocation(Manifest::COMPONENT)
.SetID("bbabcdefghijabcdefghijabcdefghij")
.Build());