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

Unified Diff: chrome/browser/devtools/global_confirm_info_bar.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/devtools/global_confirm_info_bar.cc
diff --git a/chrome/browser/devtools/global_confirm_info_bar.cc b/chrome/browser/devtools/global_confirm_info_bar.cc
index 1af35c0f830b5772736df68f5373787180d256a7..1a88612b17337d43cf6cdce75c20b02f568afefb 100644
--- a/chrome/browser/devtools/global_confirm_info_bar.cc
+++ b/chrome/browser/devtools/global_confirm_info_bar.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/devtools/global_confirm_info_bar.h"
+#include <utility>
+
#include "base/macros.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/host_desktop.h"
@@ -124,7 +126,8 @@ void GlobalConfirmInfoBar::DelegateProxy::Detach() {
// static
base::WeakPtr<GlobalConfirmInfoBar> GlobalConfirmInfoBar::Show(
scoped_ptr<ConfirmInfoBarDelegate> delegate) {
- GlobalConfirmInfoBar* info_bar = new GlobalConfirmInfoBar(delegate.Pass());
+ GlobalConfirmInfoBar* info_bar =
+ new GlobalConfirmInfoBar(std::move(delegate));
return info_bar->weak_factory_.GetWeakPtr();
}
@@ -134,7 +137,7 @@ void GlobalConfirmInfoBar::Close() {
GlobalConfirmInfoBar::GlobalConfirmInfoBar(
scoped_ptr<ConfirmInfoBarDelegate> delegate)
- : delegate_(delegate.Pass()),
+ : delegate_(std::move(delegate)),
browser_tab_strip_tracker_(this, nullptr, nullptr),
weak_factory_(this) {
browser_tab_strip_tracker_.Init(
@@ -165,7 +168,7 @@ void GlobalConfirmInfoBar::TabInsertedAt(content::WebContents* web_contents,
new GlobalConfirmInfoBar::DelegateProxy(weak_factory_.GetWeakPtr()));
GlobalConfirmInfoBar::DelegateProxy* proxy_ptr = proxy.get();
infobars::InfoBar* added_bar = infobar_service->AddInfoBar(
- infobar_service->CreateConfirmInfoBar(proxy.Pass()));
+ infobar_service->CreateConfirmInfoBar(std::move(proxy)));
proxy_ptr->info_bar_ = added_bar;
DCHECK(added_bar);

Powered by Google App Engine
This is Rietveld 408576698