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

Unified Diff: chrome/browser/media/desktop_capture_access_handler.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/media/desktop_capture_access_handler.cc
diff --git a/chrome/browser/media/desktop_capture_access_handler.cc b/chrome/browser/media/desktop_capture_access_handler.cc
index eebc17e75ba15ddda3bda9151df095ec05ac3c2a..66f37c09d6c5595f9fe0f41566df0fb867f57727 100644
--- a/chrome/browser/media/desktop_capture_access_handler.cc
+++ b/chrome/browser/media/desktop_capture_access_handler.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/media/desktop_capture_access_handler.h"
+#include <utility>
+
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -120,7 +122,7 @@ scoped_ptr<content::MediaStreamUI> GetDevicesForDesktopCapture(
}
}
- return ui.Pass();
+ return ui;
}
#if !defined(OS_ANDROID)
@@ -267,7 +269,7 @@ void DesktopCaptureAccessHandler::ProcessScreenCaptureAccessRequest(
: content::MEDIA_DEVICE_OK;
}
- callback.Run(devices, result, ui.Pass());
+ callback.Run(devices, result, std::move(ui));
}
bool DesktopCaptureAccessHandler::SupportsStreamType(
@@ -294,7 +296,7 @@ void DesktopCaptureAccessHandler::HandleRequest(
scoped_ptr<content::MediaStreamUI> ui;
if (request.video_type != content::MEDIA_DESKTOP_VIDEO_CAPTURE) {
- callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, ui.Pass());
+ callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, std::move(ui));
return;
}
@@ -331,7 +333,7 @@ void DesktopCaptureAccessHandler::HandleRequest(
// Received invalid device id.
if (media_id.type == content::DesktopMediaID::TYPE_NONE) {
- callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, ui.Pass());
+ callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, std::move(ui));
return;
}
@@ -351,7 +353,7 @@ void DesktopCaptureAccessHandler::HandleRequest(
GetApplicationTitle(web_contents, extension),
base::UTF8ToUTF16(original_extension_name));
- callback.Run(devices, content::MEDIA_DEVICE_OK, ui.Pass());
+ callback.Run(devices, content::MEDIA_DEVICE_OK, std::move(ui));
}
void DesktopCaptureAccessHandler::UpdateMediaRequestState(

Powered by Google App Engine
This is Rietveld 408576698