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

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: 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: remoting/host/desktop_session_agent.cc
diff --git a/remoting/host/desktop_session_agent.cc b/remoting/host/desktop_session_agent.cc
index dd5a3fbf7e70a7639440aa2fdf1bf3a6394cd410..b1de5ce3d099a6333a941ef4c3d9ee697d98ba96 100644
--- a/remoting/host/desktop_session_agent.cc
+++ b/remoting/host/desktop_session_agent.cc
@@ -84,7 +84,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()); }
@@ -98,7 +99,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_;
@@ -294,7 +295,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()) {

Powered by Google App Engine
This is Rietveld 408576698