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

Unified Diff: remoting/host/cast_extension_session.cc

Issue 468613002: Readability review. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 6 years, 4 months 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/cast_extension_session.cc
diff --git a/remoting/host/cast_extension_session.cc b/remoting/host/cast_extension_session.cc
index f711b466be299db9e1442b2c7b9c4e1534f1452e..76a1c743879b92edec84365a4526ac4210671ba0 100644
--- a/remoting/host/cast_extension_session.cc
+++ b/remoting/host/cast_extension_session.cc
@@ -234,28 +234,26 @@ void CastExtensionSession::OnCreateSessionDescriptionFailure(
// stream from the peer connection here, and then attempt to re-setup the
// peer connection in the OnRenegotiationNeeded() callback.
// See crbug.com/403843.
-scoped_ptr<webrtc::DesktopCapturer> CastExtensionSession::OnCreateVideoCapturer(
- scoped_ptr<webrtc::DesktopCapturer> capturer) {
+void CastExtensionSession::OnCreateVideoCapturer(
+ scoped_ptr<webrtc::DesktopCapturer>* capturer) {
if (has_grabbed_capturer_) {
LOG(ERROR) << "The video pipeline was reset unexpectedly.";
has_grabbed_capturer_ = false;
peer_connection_->RemoveStream(stream_.release());
- return capturer.Pass();
+ return;
}
if (received_offer_) {
has_grabbed_capturer_ = true;
- if (SetupVideoStream(capturer.Pass())) {
+ if (SetupVideoStream(capturer->Pass())) {
peer_connection_->CreateAnswer(create_session_desc_observer_, NULL);
} else {
has_grabbed_capturer_ = false;
// Ignore the received offer, since we failed to setup a video stream.
received_offer_ = false;
}
- return scoped_ptr<webrtc::DesktopCapturer>();
+ return;
}
-
- return capturer.Pass();
}
bool CastExtensionSession::ModifiesVideoPipeline() const {
@@ -672,4 +670,3 @@ void CastExtensionSession::OnIceCandidate(
}
} // namespace remoting
-

Powered by Google App Engine
This is Rietveld 408576698