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

Unified Diff: webrtc/pc/peerconnectionfactory_unittest.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/pc/peerconnectionfactory_unittest.cc
diff --git a/webrtc/pc/peerconnectionfactory_unittest.cc b/webrtc/pc/peerconnectionfactory_unittest.cc
index 3fa523e3e710b22932c6c928cb77e5ce2487ac9a..9a6e54310580037e3f911b85e3fb44168455b811 100644
--- a/webrtc/pc/peerconnectionfactory_unittest.cc
+++ b/webrtc/pc/peerconnectionfactory_unittest.cc
@@ -336,9 +336,11 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIPLiteralAddress) {
// local video track.
TEST_F(PeerConnectionFactoryTest, LocalRendering) {
cricket::FakeVideoCapturer* capturer = new cricket::FakeVideoCapturer();
- // The source take ownership of |capturer|.
+ // The source takes ownership of |capturer|, but we keep a raw pointer to
+ // inject fake frames.
rtc::scoped_refptr<VideoTrackSourceInterface> source(
- factory_->CreateVideoSource(capturer, NULL));
+ factory_->CreateVideoSource(
+ std::unique_ptr<cricket::VideoCapturer>(capturer), NULL));
ASSERT_TRUE(source.get() != NULL);
rtc::scoped_refptr<VideoTrackInterface> track(
factory_->CreateVideoTrack("testlabel", source));

Powered by Google App Engine
This is Rietveld 408576698