summaryrefslogtreecommitdiffstats
path: root/extensions/browser/api
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/api
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/api')
-rw-r--r--extensions/browser/api/bluetooth/bluetooth_event_router_unittest.cc9
-rw-r--r--extensions/browser/api/device_permissions_prompt_unittest.cc18
2 files changed, 15 insertions, 12 deletions
diff --git a/extensions/browser/api/bluetooth/bluetooth_event_router_unittest.cc b/extensions/browser/api/bluetooth/bluetooth_event_router_unittest.cc
index 701a28d..597d738 100644
--- a/extensions/browser/api/bluetooth/bluetooth_event_router_unittest.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_event_router_unittest.cc
@@ -83,10 +83,11 @@ TEST_F(BluetoothEventRouterTest, MultipleBluetoothEventListeners) {
TEST_F(BluetoothEventRouterTest, UnloadExtension) {
scoped_refptr<const Extension> extension =
ExtensionBuilder()
- .SetManifest(std::move(DictionaryBuilder()
- .Set("name", "BT event router test")
- .Set("version", "1.0")
- .Set("manifest_version", 2)))
+ .SetManifest(DictionaryBuilder()
+ .Set("name", "BT event router test")
+ .Set("version", "1.0")
+ .Set("manifest_version", 2)
+ .Build())
.SetID(kTestExtensionId)
.Build();
diff --git a/extensions/browser/api/device_permissions_prompt_unittest.cc b/extensions/browser/api/device_permissions_prompt_unittest.cc
index 9c2d22c..ba6a07e 100644
--- a/extensions/browser/api/device_permissions_prompt_unittest.cc
+++ b/extensions/browser/api/device_permissions_prompt_unittest.cc
@@ -19,10 +19,11 @@ class DevicePermissionsPromptTest : public testing::Test {};
TEST_F(DevicePermissionsPromptTest, HidPromptMessages) {
scoped_refptr<Extension> extension =
ExtensionBuilder()
- .SetManifest(std::move(DictionaryBuilder()
- .Set("name", "Test Application")
- .Set("manifest_version", 2)
- .Set("version", "1.0")))
+ .SetManifest(DictionaryBuilder()
+ .Set("name", "Test Application")
+ .Set("manifest_version", 2)
+ .Set("version", "1.0")
+ .Build())
.Build();
scoped_refptr<DevicePermissionsPrompt::Prompt> prompt =
@@ -47,10 +48,11 @@ TEST_F(DevicePermissionsPromptTest, HidPromptMessages) {
TEST_F(DevicePermissionsPromptTest, UsbPromptMessages) {
scoped_refptr<Extension> extension =
ExtensionBuilder()
- .SetManifest(std::move(DictionaryBuilder()
- .Set("name", "Test Application")
- .Set("manifest_version", 2)
- .Set("version", "1.0")))
+ .SetManifest(DictionaryBuilder()
+ .Set("name", "Test Application")
+ .Set("manifest_version", 2)
+ .Set("version", "1.0")
+ .Build())
.Build();
scoped_refptr<DevicePermissionsPrompt::Prompt> prompt =