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

Side by Side Diff: webrtc/pc/channel.cc

Issue 2652653012: Replace the easy cases of VERIFY usage. (Closed)
Patch Set: Let Peerconnection methods accept NULL observer. 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 unified diff | Download patch
« no previous file with comments | « webrtc/base/messagequeue.cc ('k') | webrtc/pc/peerconnection.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 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 } 1300 }
1301 1301
1302 bool BaseChannel::RemoveRecvStream_w(uint32_t ssrc) { 1302 bool BaseChannel::RemoveRecvStream_w(uint32_t ssrc) {
1303 RTC_DCHECK(worker_thread() == rtc::Thread::Current()); 1303 RTC_DCHECK(worker_thread() == rtc::Thread::Current());
1304 return media_channel()->RemoveRecvStream(ssrc); 1304 return media_channel()->RemoveRecvStream(ssrc);
1305 } 1305 }
1306 1306
1307 bool BaseChannel::UpdateLocalStreams_w(const std::vector<StreamParams>& streams, 1307 bool BaseChannel::UpdateLocalStreams_w(const std::vector<StreamParams>& streams,
1308 ContentAction action, 1308 ContentAction action,
1309 std::string* error_desc) { 1309 std::string* error_desc) {
1310 if (!VERIFY(action == CA_OFFER || action == CA_ANSWER || 1310 if (!(action == CA_OFFER || action == CA_ANSWER ||
1311 action == CA_PRANSWER || action == CA_UPDATE)) 1311 action == CA_PRANSWER || action == CA_UPDATE))
1312 return false; 1312 return false;
1313 1313
1314 // If this is an update, streams only contain streams that have changed. 1314 // If this is an update, streams only contain streams that have changed.
1315 if (action == CA_UPDATE) { 1315 if (action == CA_UPDATE) {
1316 for (StreamParamsVec::const_iterator it = streams.begin(); 1316 for (StreamParamsVec::const_iterator it = streams.begin();
1317 it != streams.end(); ++it) { 1317 it != streams.end(); ++it) {
1318 const StreamParams* existing_stream = 1318 const StreamParams* existing_stream =
1319 GetStreamByIds(local_streams_, it->groupid, it->id); 1319 GetStreamByIds(local_streams_, it->groupid, it->id);
1320 if (!existing_stream && it->has_ssrcs()) { 1320 if (!existing_stream && it->has_ssrcs()) {
1321 if (media_channel()->AddSendStream(*it)) { 1321 if (media_channel()->AddSendStream(*it)) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 } 1373 }
1374 } 1374 }
1375 local_streams_ = streams; 1375 local_streams_ = streams;
1376 return ret; 1376 return ret;
1377 } 1377 }
1378 1378
1379 bool BaseChannel::UpdateRemoteStreams_w( 1379 bool BaseChannel::UpdateRemoteStreams_w(
1380 const std::vector<StreamParams>& streams, 1380 const std::vector<StreamParams>& streams,
1381 ContentAction action, 1381 ContentAction action,
1382 std::string* error_desc) { 1382 std::string* error_desc) {
1383 if (!VERIFY(action == CA_OFFER || action == CA_ANSWER || 1383 if (!(action == CA_OFFER || action == CA_ANSWER ||
1384 action == CA_PRANSWER || action == CA_UPDATE)) 1384 action == CA_PRANSWER || action == CA_UPDATE))
1385 return false; 1385 return false;
1386 1386
1387 // If this is an update, streams only contain streams that have changed. 1387 // If this is an update, streams only contain streams that have changed.
1388 if (action == CA_UPDATE) { 1388 if (action == CA_UPDATE) {
1389 for (StreamParamsVec::const_iterator it = streams.begin(); 1389 for (StreamParamsVec::const_iterator it = streams.begin();
1390 it != streams.end(); ++it) { 1390 it != streams.end(); ++it) {
1391 const StreamParams* existing_stream = 1391 const StreamParams* existing_stream =
1392 GetStreamByIds(remote_streams_, it->groupid, it->id); 1392 GetStreamByIds(remote_streams_, it->groupid, it->id);
1393 if (!existing_stream && it->has_ssrcs()) { 1393 if (!existing_stream && it->has_ssrcs()) {
1394 if (AddRecvStream_w(*it)) { 1394 if (AddRecvStream_w(*it)) {
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
2453 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_READYTOSENDDATA, 2453 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_READYTOSENDDATA,
2454 new DataChannelReadyToSendMessageData(writable)); 2454 new DataChannelReadyToSendMessageData(writable));
2455 } 2455 }
2456 2456
2457 void RtpDataChannel::GetSrtpCryptoSuites_n( 2457 void RtpDataChannel::GetSrtpCryptoSuites_n(
2458 std::vector<int>* crypto_suites) const { 2458 std::vector<int>* crypto_suites) const {
2459 GetSupportedDataCryptoSuites(crypto_options(), crypto_suites); 2459 GetSupportedDataCryptoSuites(crypto_options(), crypto_suites);
2460 } 2460 }
2461 2461
2462 } // namespace cricket 2462 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/base/messagequeue.cc ('k') | webrtc/pc/peerconnection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698