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

Side by Side Diff: webrtc/api/statscollector.cc

Issue 2384693002: Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere (Closed)
Patch Set: !!! Created 4 years, 2 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 | « no previous file | webrtc/api/statstypes.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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 CreateTrackReports<AudioTrackVector>(stream->GetAudioTracks(), 391 CreateTrackReports<AudioTrackVector>(stream->GetAudioTracks(),
392 &reports_, track_ids_); 392 &reports_, track_ids_);
393 CreateTrackReports<VideoTrackVector>(stream->GetVideoTracks(), 393 CreateTrackReports<VideoTrackVector>(stream->GetVideoTracks(),
394 &reports_, track_ids_); 394 &reports_, track_ids_);
395 } 395 }
396 396
397 void StatsCollector::AddLocalAudioTrack(AudioTrackInterface* audio_track, 397 void StatsCollector::AddLocalAudioTrack(AudioTrackInterface* audio_track,
398 uint32_t ssrc) { 398 uint32_t ssrc) {
399 RTC_DCHECK(pc_->session()->signaling_thread()->IsCurrent()); 399 RTC_DCHECK(pc_->session()->signaling_thread()->IsCurrent());
400 RTC_DCHECK(audio_track != NULL); 400 RTC_DCHECK(audio_track != NULL);
401 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) 401 #if RTC_DCHECK_IS_ON
402 for (const auto& track : local_audio_tracks_) 402 for (const auto& track : local_audio_tracks_)
403 RTC_DCHECK(track.first != audio_track || track.second != ssrc); 403 RTC_DCHECK(track.first != audio_track || track.second != ssrc);
404 #endif 404 #endif
405 405
406 local_audio_tracks_.push_back(std::make_pair(audio_track, ssrc)); 406 local_audio_tracks_.push_back(std::make_pair(audio_track, ssrc));
407 407
408 // Create the kStatsReportTypeTrack report for the new track if there is no 408 // Create the kStatsReportTypeTrack report for the new track if there is no
409 // report yet. 409 // report yet.
410 StatsReport::Id id(StatsReport::NewTypedId(StatsReport::kStatsReportTypeTrack, 410 StatsReport::Id id(StatsReport::NewTypedId(StatsReport::kStatsReportTypeTrack,
411 audio_track->id())); 411 audio_track->id()));
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 StatsReport* report = entry.second; 964 StatsReport* report = entry.second;
965 report->set_timestamp(stats_gathering_started_); 965 report->set_timestamp(stats_gathering_started_);
966 } 966 }
967 } 967 }
968 968
969 void StatsCollector::ClearUpdateStatsCacheForTest() { 969 void StatsCollector::ClearUpdateStatsCacheForTest() {
970 stats_gathering_started_ = 0; 970 stats_gathering_started_ = 0;
971 } 971 }
972 972
973 } // namespace webrtc 973 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/statstypes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698