diff options
author | limasdf <limasdf@gmail.com> | 2015-12-19 04:04:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-19 12:06:04 +0000 |
commit | 21d67e679792a286c581f20ea8e4848b9c34061e (patch) | |
tree | dc6783b7a0229c79e3a8514293fc874eb0fa4789 /extensions/shell | |
parent | 49f72db8dbff60fb22dfddf09dddeffe54f674db (diff) | |
download | chromium_src-21d67e679792a286c581f20ea8e4848b9c34061e.zip chromium_src-21d67e679792a286c581f20ea8e4848b9c34061e.tar.gz chromium_src-21d67e679792a286c581f20ea8e4848b9c34061e.tar.bz2 |
Use rvalue reference instead of extensions::DictionaryBuilder::pass()
C++ 11 enables rvalue reference with std::move() so that removing DictionaryBuilder::Pass().
BUG=563649
TBR=thakis@chromium.org
Review URL: https://codereview.chromium.org/1532193003
Cr-Commit-Position: refs/heads/master@{#366280}
Diffstat (limited to 'extensions/shell')
-rw-r--r-- | extensions/shell/browser/api/identity/identity_api_unittest.cc | 19 | ||||
-rw-r--r-- | extensions/shell/browser/shell_native_app_window_aura_unittest.cc | 8 |
2 files changed, 13 insertions, 14 deletions
diff --git a/extensions/shell/browser/api/identity/identity_api_unittest.cc b/extensions/shell/browser/api/identity/identity_api_unittest.cc index 1802fdb..bf9248c 100644 --- a/extensions/shell/browser/api/identity/identity_api_unittest.cc +++ b/extensions/shell/browser/api/identity/identity_api_unittest.cc @@ -65,19 +65,18 @@ class IdentityApiTest : public ApiUnitTest { // Create an extension with OAuth2 scopes. set_extension( ExtensionBuilder() - .SetManifest( + .SetManifest(std::move( DictionaryBuilder() .Set("name", "Test") .Set("version", "1.0") - .Set( - "oauth2", - DictionaryBuilder() - .Set("client_id", - "123456.apps.googleusercontent.com") - .Set( - "scopes", - std::move(ListBuilder().Append( - "https://www.googleapis.com/auth/drive"))))) + .Set("oauth2", + std::move(DictionaryBuilder() + .Set("client_id", + "123456.apps.googleusercontent.com") + .Set("scopes", + std::move(ListBuilder().Append( + "https://www.googleapis.com/" + "auth/drive"))))))) .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 5592f1d..728e787 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,10 @@ TEST_F(ShellNativeAppWindowAuraTest, Bounds) { new content::TestBrowserContext); scoped_refptr<Extension> extension = ExtensionBuilder() - .SetManifest(DictionaryBuilder() - .Set("name", "test extension") - .Set("version", "1") - .Set("manifest_version", 2)) + .SetManifest(std::move(DictionaryBuilder() + .Set("name", "test extension") + .Set("version", "1") + .Set("manifest_version", 2))) .Build(); AppWindow* app_window = new AppWindow( |