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

Unified Diff: webrtc/examples/peerconnection/client/conductor.cc

Issue 2685093002: Switching some interfaces to use std::unique_ptr<>. (Closed)
Patch Set: Rebase onto master Created 3 years, 10 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: webrtc/examples/peerconnection/client/conductor.cc
diff --git a/webrtc/examples/peerconnection/client/conductor.cc b/webrtc/examples/peerconnection/client/conductor.cc
index 8c288ebf266dc374a29965a26e9855240b8775e1..7c410274749a6d284ef89ff2cc8a4ae082c1a0d5 100644
--- a/webrtc/examples/peerconnection/client/conductor.cc
+++ b/webrtc/examples/peerconnection/client/conductor.cc
@@ -366,7 +366,7 @@ void Conductor::ConnectToPeer(int peer_id) {
}
}
-cricket::VideoCapturer* Conductor::OpenVideoCaptureDevice() {
+std::unique_ptr<cricket::VideoCapturer> Conductor::OpenVideoCaptureDevice() {
std::vector<std::string> device_names;
{
std::unique_ptr<webrtc::VideoCaptureModule::DeviceInfo> info(
@@ -386,7 +386,7 @@ cricket::VideoCapturer* Conductor::OpenVideoCaptureDevice() {
}
cricket::WebRtcVideoDeviceCapturerFactory factory;
- cricket::VideoCapturer* capturer = nullptr;
+ std::unique_ptr<cricket::VideoCapturer> capturer;
for (const auto& name : device_names) {
capturer = factory.Create(cricket::Device(name, 0));
if (capturer) {

Powered by Google App Engine
This is Rietveld 408576698