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

Unified Diff: remoting/host/desktop_session_agent.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/desktop_process_unittest.cc ('k') | remoting/host/desktop_session_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_session_agent.cc
diff --git a/remoting/host/desktop_session_agent.cc b/remoting/host/desktop_session_agent.cc
index 68fad4f7444369f16afe534956376993fba52d9b..add8b7020974f61e046313716e1b70a81bda01ce 100644
--- a/remoting/host/desktop_session_agent.cc
+++ b/remoting/host/desktop_session_agent.cc
@@ -4,6 +4,8 @@
#include "remoting/host/desktop_session_agent.h"
+#include <utility>
+
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/macros.h"
@@ -86,7 +88,8 @@ class DesktopSessionAgent::SharedBuffer : public webrtc::SharedMemory {
if (!memory->CreateAndMapAnonymous(size))
return nullptr;
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
- return make_scoped_ptr(new SharedBuffer(agent, memory.Pass(), size, id));
+ return make_scoped_ptr(
+ new SharedBuffer(agent, std::move(memory), size, id));
}
~SharedBuffer() override { agent_->OnSharedBufferDeleted(id()); }
@@ -100,7 +103,7 @@ class DesktopSessionAgent::SharedBuffer : public webrtc::SharedMemory {
int id)
: SharedMemory(memory->memory(), size, 0, id),
agent_(agent),
- shared_memory_(memory.Pass()) {}
+ shared_memory_(std::move(memory)) {}
DesktopSessionAgent* agent_;
scoped_ptr<base::SharedMemory> shared_memory_;
@@ -296,7 +299,7 @@ void DesktopSessionAgent::OnStartSessionAgent(
// Start the input injector.
scoped_ptr<protocol::ClipboardStub> clipboard_stub(
new DesktopSesssionClipboardStub(this));
- input_injector_->Start(clipboard_stub.Pass());
+ input_injector_->Start(std::move(clipboard_stub));
// Start the audio capturer.
if (delegate_->desktop_environment_factory().SupportsAudioCapture()) {
« no previous file with comments | « remoting/host/desktop_process_unittest.cc ('k') | remoting/host/desktop_session_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698