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

Unified Diff: remoting/host/desktop_capturer_proxy.cc

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
Patch Set: include <utility> 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 | « remoting/host/daemon_process_win.cc ('k') | remoting/host/desktop_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_capturer_proxy.cc
diff --git a/remoting/host/desktop_capturer_proxy.cc b/remoting/host/desktop_capturer_proxy.cc
index ae088703ae27010ca6e85c064e74e74bedd99de6..048f077436c6439c41774e3484460b34de15926d 100644
--- a/remoting/host/desktop_capturer_proxy.cc
+++ b/remoting/host/desktop_capturer_proxy.cc
@@ -6,6 +6,8 @@
#include <stddef.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/location.h"
#include "base/macros.h"
@@ -47,7 +49,7 @@ DesktopCapturerProxy::Core::Core(
scoped_ptr<webrtc::DesktopCapturer> capturer)
: proxy_(proxy),
caller_task_runner_(base::ThreadTaskRunnerHandle::Get()),
- capturer_(capturer.Pass()) {
+ capturer_(std::move(capturer)) {
thread_checker_.DetachFromThread();
}
@@ -87,10 +89,9 @@ void DesktopCapturerProxy::Core::OnCaptureCompleted(
DesktopCapturerProxy::DesktopCapturerProxy(
scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
scoped_ptr<webrtc::DesktopCapturer> capturer)
- : capture_task_runner_(capture_task_runner),
- weak_factory_(this) {
+ : capture_task_runner_(capture_task_runner), weak_factory_(this) {
core_.reset(new Core(weak_factory_.GetWeakPtr(), capture_task_runner,
- capturer.Pass()));
+ std::move(capturer)));
}
void DesktopCapturerProxy::Start(Callback* callback) {
« no previous file with comments | « remoting/host/daemon_process_win.cc ('k') | remoting/host/desktop_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698