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

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

Issue 2623473004: Replace all use of the VERIFY macro. (Closed)
Patch Set: Tweaks after reviewing diff to master. 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 requested_str.append(" "); 347 requested_str.append(" ");
348 } 348 }
349 LOG(LS_WARNING) << "Ignoring new set of SRTP ciphers, as DTLS " 349 LOG(LS_WARNING) << "Ignoring new set of SRTP ciphers, as DTLS "
350 << "renegotiation is not supported currently " 350 << "renegotiation is not supported currently "
351 << "current cipher = " << current_srtp_cipher << " and " 351 << "current cipher = " << current_srtp_cipher << " and "
352 << "requested = " << "[" << requested_str << "]"; 352 << "requested = " << "[" << requested_str << "]";
353 } 353 }
354 return true; 354 return true;
355 } 355 }
356 356
357 if (!VERIFY(dtls_state() == DTLS_TRANSPORT_NEW)) { 357 // TODO(nisse): Bad style of error handling. Should it be a DCHECK or not?
nisse-webrtc 2017/02/07 10:48:15 And what to do about this case?
kwiberg-webrtc 2017/02/07 11:45:08 Dunno. The code should either handle the error, or
nisse-webrtc 2017/02/07 13:52:40 After looking at the other code in this file, it s
358 RTC_DCHECK(dtls_state() == DTLS_TRANSPORT_NEW);
359 if (dtls_state() != DTLS_TRANSPORT_NEW) {
358 return false; 360 return false;
359 } 361 }
360 362
361 srtp_ciphers_ = ciphers; 363 srtp_ciphers_ = ciphers;
362 return true; 364 return true;
363 } 365 }
364 366
365 bool DtlsTransport::GetSrtpCryptoSuite(int* cipher) { 367 bool DtlsTransport::GetSrtpCryptoSuite(int* cipher) {
366 if (dtls_state() != DTLS_TRANSPORT_CONNECTED) { 368 if (dtls_state() != DTLS_TRANSPORT_CONNECTED) {
367 return false; 369 return false;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 716
715 dtls_->SetInitialRetransmissionTimeout(initial_timeout); 717 dtls_->SetInitialRetransmissionTimeout(initial_timeout);
716 } else { 718 } else {
717 LOG_J(LS_INFO, this) 719 LOG_J(LS_INFO, this)
718 << "no RTT estimate - using default DTLS handshake timeout"; 720 << "no RTT estimate - using default DTLS handshake timeout";
719 } 721 }
720 } 722 }
721 723
722 724
723 } // namespace cricket 725 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698