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

Side by Side Diff: webrtc/p2p/base/jseptransport.cc

Issue 2620303003: Replace ASSERT by RTC_DCHECK in all non-test code. (Closed)
Patch Set: Address final nits. 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/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/p2ptransportchannel.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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 std::string* error_desc) const { 305 std::string* error_desc) const {
306 if (!fingerprint) { 306 if (!fingerprint) {
307 return BadTransportDescription("No fingerprint.", error_desc); 307 return BadTransportDescription("No fingerprint.", error_desc);
308 } 308 }
309 if (!certificate) { 309 if (!certificate) {
310 return BadTransportDescription( 310 return BadTransportDescription(
311 "Fingerprint provided but no identity available.", error_desc); 311 "Fingerprint provided but no identity available.", error_desc);
312 } 312 }
313 std::unique_ptr<rtc::SSLFingerprint> fp_tmp(rtc::SSLFingerprint::Create( 313 std::unique_ptr<rtc::SSLFingerprint> fp_tmp(rtc::SSLFingerprint::Create(
314 fingerprint->algorithm, certificate->identity())); 314 fingerprint->algorithm, certificate->identity()));
315 ASSERT(fp_tmp.get() != NULL); 315 RTC_DCHECK(fp_tmp.get() != NULL);
316 if (*fp_tmp == *fingerprint) { 316 if (*fp_tmp == *fingerprint) {
317 return true; 317 return true;
318 } 318 }
319 std::ostringstream desc; 319 std::ostringstream desc;
320 desc << "Local fingerprint does not match identity. Expected: "; 320 desc << "Local fingerprint does not match identity. Expected: ";
321 desc << fp_tmp->ToString(); 321 desc << fp_tmp->ToString();
322 desc << " Got: " << fingerprint->ToString(); 322 desc << " Got: " << fingerprint->ToString();
323 return BadTransportDescription(desc.str(), error_desc); 323 return BadTransportDescription(desc.str(), error_desc);
324 } 324 }
325 325
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 } 474 }
475 475
476 // If local is passive, local will act as server. 476 // If local is passive, local will act as server.
477 } 477 }
478 478
479 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER; 479 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER;
480 return true; 480 return true;
481 } 481 }
482 482
483 } // namespace cricket 483 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698