Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(782)

Unified Diff: chrome/browser/extensions/webstore_installer_browsertest.cc

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/extensions/webstore_reinstaller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/webstore_installer_browsertest.cc
diff --git a/chrome/browser/extensions/webstore_installer_browsertest.cc b/chrome/browser/extensions/webstore_installer_browsertest.cc
index 3a77e3c9daf27856a9af55f2f10a888c4a287ae1..0e301d2b0b6b840cbd6c4fb5fabca05d51c5bdb9 100644
--- a/chrome/browser/extensions/webstore_installer_browsertest.cc
+++ b/chrome/browser/extensions/webstore_installer_browsertest.cc
@@ -41,8 +41,12 @@ class TestWebstoreInstaller : public WebstoreInstaller {
const std::string& id,
scoped_ptr<Approval> approval,
InstallSource source)
- : WebstoreInstaller(
- profile, delegate, web_contents, id, approval.Pass(), source) {}
+ : WebstoreInstaller(profile,
+ delegate,
+ web_contents,
+ id,
+ std::move(approval),
+ source) {}
void SetDeletedClosure(const base::Closure& cb) { deleted_closure_ = cb; }
@@ -129,22 +133,14 @@ IN_PROC_BROWSER_TEST_F(WebstoreInstallerBrowserTest, WebstoreInstall) {
// Create an approval.
scoped_ptr<WebstoreInstaller::Approval> approval =
WebstoreInstaller::Approval::CreateWithNoInstallPrompt(
- browser()->profile(),
- kTestExtensionId,
- manifest.Pass(),
- false);
+ browser()->profile(), kTestExtensionId, std::move(manifest), false);
// Create and run a WebstoreInstaller.
base::RunLoop run_loop;
SetDoneClosure(run_loop.QuitClosure());
- TestWebstoreInstaller* installer =
- new TestWebstoreInstaller(
- browser()->profile(),
- this,
- active_web_contents,
- kTestExtensionId,
- approval.Pass(),
- WebstoreInstaller::INSTALL_SOURCE_OTHER);
+ TestWebstoreInstaller* installer = new TestWebstoreInstaller(
+ browser()->profile(), this, active_web_contents, kTestExtensionId,
+ std::move(approval), WebstoreInstaller::INSTALL_SOURCE_OTHER);
installer->Start();
run_loop.Run();
@@ -178,22 +174,18 @@ IN_PROC_BROWSER_TEST_F(WebstoreInstallerBrowserTest, SimultaneousInstall) {
// Create and run a WebstoreInstaller.
base::RunLoop run_loop;
SetDoneClosure(run_loop.QuitClosure());
- scoped_refptr<TestWebstoreInstaller> installer =
- new TestWebstoreInstaller(
- browser()->profile(),
- this,
- active_web_contents,
- kTestExtensionId,
- approval.Pass(),
- WebstoreInstaller::INSTALL_SOURCE_OTHER);
+ scoped_refptr<TestWebstoreInstaller> installer = new TestWebstoreInstaller(
+ browser()->profile(), this, active_web_contents, kTestExtensionId,
+ std::move(approval), WebstoreInstaller::INSTALL_SOURCE_OTHER);
installer->Start();
// Simulate another mechanism installing the same extension.
scoped_refptr<const Extension> extension =
- ExtensionBuilder().SetLocation(Manifest::INTERNAL)
- .SetID(kTestExtensionId)
- .SetManifest(manifest.Pass())
- .Build();
+ ExtensionBuilder()
+ .SetLocation(Manifest::INTERNAL)
+ .SetID(kTestExtensionId)
+ .SetManifest(std::move(manifest))
+ .Build();
extension_service()->OnExtensionInstalled(extension.get(),
syncer::StringOrdinal(),
0);
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/extensions/webstore_reinstaller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698