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

Unified Diff: webrtc/base/openssldigest.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/openssladapter.cc ('k') | webrtc/base/opensslidentity.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/openssldigest.cc
diff --git a/webrtc/base/openssldigest.cc b/webrtc/base/openssldigest.cc
index 0d22f4329c5d09b3b1c1938bf80eef8b9b04eeda..2618b7f9fd2ec1a8025bd33f3ef53452f8eb9c28 100644
--- a/webrtc/base/openssldigest.cc
+++ b/webrtc/base/openssldigest.cc
@@ -12,6 +12,7 @@
#include "webrtc/base/openssldigest.h"
+#include "webrtc/base/checks.h"
#include "webrtc/base/common.h"
#include "webrtc/base/openssl.h"
@@ -51,7 +52,7 @@ size_t OpenSSLDigest::Finish(void* buf, size_t len) {
unsigned int md_len;
EVP_DigestFinal_ex(&ctx_, static_cast<unsigned char*>(buf), &md_len);
EVP_DigestInit_ex(&ctx_, md_, NULL); // prepare for future Update()s
- ASSERT(md_len == Size());
+ RTC_DCHECK(md_len == Size());
return md_len;
}
@@ -75,15 +76,15 @@ bool OpenSSLDigest::GetDigestEVP(const std::string& algorithm,
}
// Can't happen
- ASSERT(EVP_MD_size(md) >= 16);
+ RTC_DCHECK(EVP_MD_size(md) >= 16);
*mdp = md;
return true;
}
bool OpenSSLDigest::GetDigestName(const EVP_MD* md,
std::string* algorithm) {
- ASSERT(md != NULL);
- ASSERT(algorithm != NULL);
+ RTC_DCHECK(md != NULL);
+ RTC_DCHECK(algorithm != NULL);
int md_type = EVP_MD_type(md);
if (md_type == NID_md5) {
@@ -119,4 +120,3 @@ bool OpenSSLDigest::GetDigestSize(const std::string& algorithm,
} // namespace rtc
#endif // HAVE_OPENSSL_SSL_H
-
« no previous file with comments | « webrtc/base/openssladapter.cc ('k') | webrtc/base/opensslidentity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698