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

Unified Diff: chrome/browser/media/media_stream_infobar_delegate_android.cc

Issue 1551033002: Convert Pass()→std::move() in //chrome (Android edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable RVO by making types match 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/media/media_stream_infobar_delegate_android.cc
diff --git a/chrome/browser/media/media_stream_infobar_delegate_android.cc b/chrome/browser/media/media_stream_infobar_delegate_android.cc
index 97162ef2d2501f9f7050b2a1aff410375b81fb1b..bcbc4290dc4960e9b0a0fc09cb87be1d87320489 100644
--- a/chrome/browser/media/media_stream_infobar_delegate_android.cc
+++ b/chrome/browser/media/media_stream_infobar_delegate_android.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/media/media_stream_infobar_delegate_android.h"
#include <stddef.h>
+#include <utility>
#include "base/logging.h"
#include "base/metrics/histogram.h"
@@ -50,15 +51,15 @@ bool MediaStreamInfoBarDelegateAndroid::Create(
scoped_ptr<infobars::InfoBar> infobar(
infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
- new MediaStreamInfoBarDelegateAndroid(controller.Pass()))));
+ new MediaStreamInfoBarDelegateAndroid(std::move(controller)))));
for (size_t i = 0; i < infobar_service->infobar_count(); ++i) {
infobars::InfoBar* old_infobar = infobar_service->infobar_at(i);
if (old_infobar->delegate()->AsMediaStreamInfoBarDelegateAndroid()) {
- infobar_service->ReplaceInfoBar(old_infobar, infobar.Pass());
+ infobar_service->ReplaceInfoBar(old_infobar, std::move(infobar));
return true;
}
}
- infobar_service->AddInfoBar(infobar.Pass());
+ infobar_service->AddInfoBar(std::move(infobar));
return true;
}
@@ -72,7 +73,7 @@ bool MediaStreamInfoBarDelegateAndroid::IsRequestingMicrophoneAccess() const {
MediaStreamInfoBarDelegateAndroid::MediaStreamInfoBarDelegateAndroid(
scoped_ptr<MediaStreamDevicesController> controller)
- : ConfirmInfoBarDelegate(), controller_(controller.Pass()) {
+ : ConfirmInfoBarDelegate(), controller_(std::move(controller)) {
DCHECK(controller_.get());
DCHECK(controller_->IsAskingForAudio() || controller_->IsAskingForVideo());
}

Powered by Google App Engine
This is Rietveld 408576698