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

Unified Diff: remoting/host/cast_extension_session.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/cast_extension.cc ('k') | remoting/host/chromeos/aura_desktop_capturer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/cast_extension_session.cc
diff --git a/remoting/host/cast_extension_session.cc b/remoting/host/cast_extension_session.cc
index 0364bce7f04f15c62e4f3193df52dda194482fcb..4ad16cebe690856c73d4c99bb19fe59e957ad224 100644
--- a/remoting/host/cast_extension_session.cc
+++ b/remoting/host/cast_extension_session.cc
@@ -4,6 +4,8 @@
#include "remoting/host/cast_extension_session.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
@@ -182,7 +184,7 @@ scoped_ptr<CastExtensionSession> CastExtensionSession::Create(
!cast_extension_session->InitializePeerConnection()) {
return nullptr;
}
- return cast_extension_session.Pass();
+ return cast_extension_session;
}
void CastExtensionSession::OnCreateSessionDescription(
@@ -236,7 +238,7 @@ void CastExtensionSession::OnCreateVideoCapturer(
if (received_offer_) {
has_grabbed_capturer_ = true;
- if (SetupVideoStream(capturer->Pass())) {
+ if (SetupVideoStream(std::move(*capturer))) {
peer_connection_->CreateAnswer(create_session_desc_observer_, nullptr);
} else {
has_grabbed_capturer_ = false;
@@ -528,7 +530,7 @@ bool CastExtensionSession::SetupVideoStream(
}
scoped_ptr<WebrtcVideoCapturerAdapter> video_capturer_adapter(
- new WebrtcVideoCapturerAdapter(desktop_capturer.Pass()));
+ new WebrtcVideoCapturerAdapter(std::move(desktop_capturer)));
// Set video stream constraints.
webrtc::FakeConstraints video_constraints;
« no previous file with comments | « remoting/host/cast_extension.cc ('k') | remoting/host/chromeos/aura_desktop_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698