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

Unified Diff: chrome/browser/extensions/api/webstore_private/webstore_private_api.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
Index: chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
index e49f4f28393bf8f838c00727c59c79b32f2461c2..ca0831ad41e2bc5563c26a73c7a48c1bcae527f4 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h"
#include <stddef.h>
+#include <utility>
#include "base/bind.h"
#include "base/lazy_instance.h"
@@ -314,10 +315,8 @@ void WebstorePrivateBeginInstallWithManifest3Function::InstallUIProceed() {
// entry is only valid for some number of minutes.
scoped_ptr<WebstoreInstaller::Approval> approval(
WebstoreInstaller::Approval::CreateWithNoInstallPrompt(
- chrome_details_.GetProfile(),
- details().id,
- parsed_manifest_.Pass(),
- false));
+ chrome_details_.GetProfile(), details().id,
+ std::move(parsed_manifest_), false));
approval->use_app_installed_bubble = details().app_install_bubble;
approval->enable_launcher = details().enable_launcher;
// If we are enabling the launcher, we should not show the app list in order
@@ -327,7 +326,7 @@ void WebstorePrivateBeginInstallWithManifest3Function::InstallUIProceed() {
approval->installing_icon = gfx::ImageSkia::CreateFrom1xBitmap(icon_);
if (details().authuser)
approval->authuser = *details().authuser;
- g_pending_approvals.Get().PushApproval(approval.Pass());
+ g_pending_approvals.Get().PushApproval(std::move(approval));
DCHECK(scoped_active_install_.get());
scoped_active_install_->CancelDeregister();
@@ -402,9 +401,8 @@ WebstorePrivateCompleteInstallFunction::Run() {
if (!crx_file::id_util::IdIsValid(params->expected_id))
return RespondNow(Error(kInvalidIdError));
- approval_ =
- g_pending_approvals.Get().PopApproval(chrome_details_.GetProfile(),
- params->expected_id).Pass();
+ approval_ = g_pending_approvals.Get().PopApproval(
+ chrome_details_.GetProfile(), params->expected_id);
if (!approval_) {
return RespondNow(Error(kNoPreviousBeginInstallWithManifestError,
params->expected_id));
@@ -436,12 +434,9 @@ WebstorePrivateCompleteInstallFunction::Run() {
// The extension will install through the normal extension install flow, but
// the whitelist entry will bypass the normal permissions install dialog.
scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller(
- chrome_details_.GetProfile(),
- this,
- chrome_details_.GetAssociatedWebContents(),
- params->expected_id,
- approval_.Pass(),
- WebstoreInstaller::INSTALL_SOURCE_OTHER);
+ chrome_details_.GetProfile(), this,
+ chrome_details_.GetAssociatedWebContents(), params->expected_id,
+ std::move(approval_), WebstoreInstaller::INSTALL_SOURCE_OTHER);
installer->Start();
return RespondLater();

Powered by Google App Engine
This is Rietveld 408576698