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

Unified Diff: remoting/host/client_session.cc

Issue 609923004: Cleanup usage of scoped_ptr<> in remoting for C++11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index feb581d19798ad73bff660175a68f864b138be7d..8d45b8fb0d32216d35f05714543440dbc00538ad 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -494,15 +494,15 @@ scoped_ptr<VideoEncoder> ClientSession::CreateVideoEncoder(
const protocol::ChannelConfig& video_config = config.video_config();
if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) {
- return remoting::VideoEncoderVpx::CreateForVP8().PassAs<VideoEncoder>();
+ return remoting::VideoEncoderVpx::CreateForVP8().Pass();
} else if (video_config.codec == protocol::ChannelConfig::CODEC_VP9) {
- return remoting::VideoEncoderVpx::CreateForVP9().PassAs<VideoEncoder>();
+ return remoting::VideoEncoderVpx::CreateForVP9().Pass();
} else if (video_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) {
- return scoped_ptr<VideoEncoder>(new remoting::VideoEncoderVerbatim());
+ return make_scoped_ptr(new remoting::VideoEncoderVerbatim());
rmsousa 2014/09/27 01:49:20 Isn't this returning a different scoped_ptr type (
Sergey Ulanov 2014/09/29 17:33:24 Yes, upcast is automatic now (that's why PassAs()
}
NOTREACHED();
- return scoped_ptr<VideoEncoder>();
+ return nullptr;
}
// static
@@ -517,7 +517,7 @@ scoped_ptr<AudioEncoder> ClientSession::CreateAudioEncoder(
}
NOTREACHED();
- return scoped_ptr<AudioEncoder>();
+ return nullptr;
}
} // namespace remoting
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698