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

Side by Side Diff: talk/app/webrtc/test/peerconnectiontestwrapper.cc

Issue 1460043002: Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Restore the Pass methods 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 unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/test/fakedtlsidentitystore.h ('k') | talk/app/webrtc/webrtcsession.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation 11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution. 12 * and/or other materials provided with the distribution.
13 * 3. The name of the author may not be used to endorse or promote products 13 * 3. The name of the author may not be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #include <utility>
29
28 #include "talk/app/webrtc/fakeportallocatorfactory.h" 30 #include "talk/app/webrtc/fakeportallocatorfactory.h"
29 #include "talk/app/webrtc/test/fakedtlsidentitystore.h" 31 #include "talk/app/webrtc/test/fakedtlsidentitystore.h"
30 #include "talk/app/webrtc/test/fakeperiodicvideocapturer.h" 32 #include "talk/app/webrtc/test/fakeperiodicvideocapturer.h"
31 #include "talk/app/webrtc/test/mockpeerconnectionobservers.h" 33 #include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
32 #include "talk/app/webrtc/test/peerconnectiontestwrapper.h" 34 #include "talk/app/webrtc/test/peerconnectiontestwrapper.h"
33 #include "talk/app/webrtc/videosourceinterface.h" 35 #include "talk/app/webrtc/videosourceinterface.h"
34 #include "webrtc/base/gunit.h" 36 #include "webrtc/base/gunit.h"
35 37
36 static const char kStreamLabelBase[] = "stream_label"; 38 static const char kStreamLabelBase[] = "stream_label";
37 static const char kVideoTrackLabelBase[] = "video_track"; 39 static const char kVideoTrackLabelBase[] = "video_track";
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // CreatePeerConnection with IceServers. 92 // CreatePeerConnection with IceServers.
91 webrtc::PeerConnectionInterface::IceServers ice_servers; 93 webrtc::PeerConnectionInterface::IceServers ice_servers;
92 webrtc::PeerConnectionInterface::IceServer ice_server; 94 webrtc::PeerConnectionInterface::IceServer ice_server;
93 ice_server.uri = "stun:stun.l.google.com:19302"; 95 ice_server.uri = "stun:stun.l.google.com:19302";
94 ice_servers.push_back(ice_server); 96 ice_servers.push_back(ice_server);
95 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store( 97 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store(
96 rtc::SSLStreamAdapter::HaveDtlsSrtp() ? 98 rtc::SSLStreamAdapter::HaveDtlsSrtp() ?
97 new FakeDtlsIdentityStore() : nullptr); 99 new FakeDtlsIdentityStore() : nullptr);
98 peer_connection_ = peer_connection_factory_->CreatePeerConnection( 100 peer_connection_ = peer_connection_factory_->CreatePeerConnection(
99 ice_servers, constraints, allocator_factory_.get(), 101 ice_servers, constraints, allocator_factory_.get(),
100 dtls_identity_store.Pass(), this); 102 std::move(dtls_identity_store), this);
101 103
102 return peer_connection_.get() != NULL; 104 return peer_connection_.get() != NULL;
103 } 105 }
104 106
105 rtc::scoped_refptr<webrtc::DataChannelInterface> 107 rtc::scoped_refptr<webrtc::DataChannelInterface>
106 PeerConnectionTestWrapper::CreateDataChannel( 108 PeerConnectionTestWrapper::CreateDataChannel(
107 const std::string& label, 109 const std::string& label,
108 const webrtc::DataChannelInit& init) { 110 const webrtc::DataChannelInit& init) {
109 return peer_connection_->CreateDataChannel(label, &init); 111 return peer_connection_->CreateDataChannel(label, &init);
110 } 112 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 peer_connection_factory_->CreateVideoSource( 290 peer_connection_factory_->CreateVideoSource(
289 new webrtc::FakePeriodicVideoCapturer(), &constraints); 291 new webrtc::FakePeriodicVideoCapturer(), &constraints);
290 std::string videotrack_label = label + kVideoTrackLabelBase; 292 std::string videotrack_label = label + kVideoTrackLabelBase;
291 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( 293 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track(
292 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); 294 peer_connection_factory_->CreateVideoTrack(videotrack_label, source));
293 295
294 stream->AddTrack(video_track); 296 stream->AddTrack(video_track);
295 } 297 }
296 return stream; 298 return stream;
297 } 299 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/test/fakedtlsidentitystore.h ('k') | talk/app/webrtc/webrtcsession.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698