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

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

Issue 2623313004: Replace RTC_DCHECK(false) with RTC_NOTREACHED(). (Closed)
Patch Set: Created 3 years, 11 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/api/rtpsender.cc ('k') | 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 } 344 }
345 if (candidate_type == cricket::STUN_PORT_TYPE) { 345 if (candidate_type == cricket::STUN_PORT_TYPE) {
346 return STATSREPORT_STUN_PORT_TYPE; 346 return STATSREPORT_STUN_PORT_TYPE;
347 } 347 }
348 if (candidate_type == cricket::PRFLX_PORT_TYPE) { 348 if (candidate_type == cricket::PRFLX_PORT_TYPE) {
349 return STATSREPORT_PRFLX_PORT_TYPE; 349 return STATSREPORT_PRFLX_PORT_TYPE;
350 } 350 }
351 if (candidate_type == cricket::RELAY_PORT_TYPE) { 351 if (candidate_type == cricket::RELAY_PORT_TYPE) {
352 return STATSREPORT_RELAY_PORT_TYPE; 352 return STATSREPORT_RELAY_PORT_TYPE;
353 } 353 }
354 RTC_DCHECK(false); 354 RTC_NOTREACHED();
355 return "unknown"; 355 return "unknown";
356 } 356 }
357 357
358 const char* AdapterTypeToStatsType(rtc::AdapterType type) { 358 const char* AdapterTypeToStatsType(rtc::AdapterType type) {
359 switch (type) { 359 switch (type) {
360 case rtc::ADAPTER_TYPE_UNKNOWN: 360 case rtc::ADAPTER_TYPE_UNKNOWN:
361 return "unknown"; 361 return "unknown";
362 case rtc::ADAPTER_TYPE_ETHERNET: 362 case rtc::ADAPTER_TYPE_ETHERNET:
363 return STATSREPORT_ADAPTER_TYPE_ETHERNET; 363 return STATSREPORT_ADAPTER_TYPE_ETHERNET;
364 case rtc::ADAPTER_TYPE_WIFI: 364 case rtc::ADAPTER_TYPE_WIFI:
365 return STATSREPORT_ADAPTER_TYPE_WIFI; 365 return STATSREPORT_ADAPTER_TYPE_WIFI;
366 case rtc::ADAPTER_TYPE_CELLULAR: 366 case rtc::ADAPTER_TYPE_CELLULAR:
367 return STATSREPORT_ADAPTER_TYPE_WWAN; 367 return STATSREPORT_ADAPTER_TYPE_WWAN;
368 case rtc::ADAPTER_TYPE_VPN: 368 case rtc::ADAPTER_TYPE_VPN:
369 return STATSREPORT_ADAPTER_TYPE_VPN; 369 return STATSREPORT_ADAPTER_TYPE_VPN;
370 case rtc::ADAPTER_TYPE_LOOPBACK: 370 case rtc::ADAPTER_TYPE_LOOPBACK:
371 return STATSREPORT_ADAPTER_TYPE_LOOPBACK; 371 return STATSREPORT_ADAPTER_TYPE_LOOPBACK;
372 default: 372 default:
373 RTC_DCHECK(false); 373 RTC_NOTREACHED();
374 return ""; 374 return "";
375 } 375 }
376 } 376 }
377 377
378 StatsCollector::StatsCollector(PeerConnection* pc) 378 StatsCollector::StatsCollector(PeerConnection* pc)
379 : pc_(pc), stats_gathering_started_(0) { 379 : pc_(pc), stats_gathering_started_(0) {
380 RTC_DCHECK(pc_); 380 RTC_DCHECK(pc_);
381 } 381 }
382 382
383 StatsCollector::~StatsCollector() { 383 StatsCollector::~StatsCollector() {
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 StatsReport* report = entry.second; 978 StatsReport* report = entry.second;
979 report->set_timestamp(stats_gathering_started_); 979 report->set_timestamp(stats_gathering_started_);
980 } 980 }
981 } 981 }
982 982
983 void StatsCollector::ClearUpdateStatsCacheForTest() { 983 void StatsCollector::ClearUpdateStatsCacheForTest() {
984 stats_gathering_started_ = 0; 984 stats_gathering_started_ = 0;
985 } 985 }
986 986
987 } // namespace webrtc 987 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/rtpsender.cc ('k') | webrtc/api/statstypes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698