summaryrefslogtreecommitdiffstats
path: root/extensions/shell
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/shell
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/shell')
-rw-r--r--extensions/shell/browser/api/identity/identity_api_unittest.cc19
-rw-r--r--extensions/shell/browser/shell_native_app_window_aura_unittest.cc9
2 files changed, 16 insertions, 12 deletions
diff --git a/extensions/shell/browser/api/identity/identity_api_unittest.cc b/extensions/shell/browser/api/identity/identity_api_unittest.cc
index bf9248c..0af6e4b1 100644
--- a/extensions/shell/browser/api/identity/identity_api_unittest.cc
+++ b/extensions/shell/browser/api/identity/identity_api_unittest.cc
@@ -65,18 +65,21 @@ class IdentityApiTest : public ApiUnitTest {
// Create an extension with OAuth2 scopes.
set_extension(
ExtensionBuilder()
- .SetManifest(std::move(
+ .SetManifest(
DictionaryBuilder()
.Set("name", "Test")
.Set("version", "1.0")
.Set("oauth2",
- std::move(DictionaryBuilder()
- .Set("client_id",
- "123456.apps.googleusercontent.com")
- .Set("scopes",
- std::move(ListBuilder().Append(
- "https://www.googleapis.com/"
- "auth/drive")))))))
+ DictionaryBuilder()
+ .Set("client_id",
+ "123456.apps.googleusercontent.com")
+ .Set("scopes",
+ ListBuilder()
+ .Append("https://www.googleapis.com/"
+ "auth/drive")
+ .Build())
+ .Build())
+ .Build())
.SetLocation(Manifest::UNPACKED)
.Build());
}
diff --git a/extensions/shell/browser/shell_native_app_window_aura_unittest.cc b/extensions/shell/browser/shell_native_app_window_aura_unittest.cc
index 728e787..be7df4b 100644
--- a/extensions/shell/browser/shell_native_app_window_aura_unittest.cc
+++ b/extensions/shell/browser/shell_native_app_window_aura_unittest.cc
@@ -44,10 +44,11 @@ TEST_F(ShellNativeAppWindowAuraTest, Bounds) {
new content::TestBrowserContext);
scoped_refptr<Extension> extension =
ExtensionBuilder()
- .SetManifest(std::move(DictionaryBuilder()
- .Set("name", "test extension")
- .Set("version", "1")
- .Set("manifest_version", 2)))
+ .SetManifest(DictionaryBuilder()
+ .Set("name", "test extension")
+ .Set("version", "1")
+ .Set("manifest_version", 2)
+ .Build())
.Build();
AppWindow* app_window = new AppWindow(