diff options
author | kushi.p@gmail.com <kushi.p@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-28 18:20:09 +0000 |
---|---|---|
committer | kushi.p@gmail.com <kushi.p@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-28 18:20:09 +0000 |
commit | 5e0be64ec9fa6b9255c70d8982c9469cab48e4d8 (patch) | |
tree | 05196e9f8920cfa7203e8fead723f6eeee446788 /crypto | |
parent | 961ac948a36146baafc52f957dfd187b19d2cd04 (diff) | |
download | chromium_src-5e0be64ec9fa6b9255c70d8982c9469cab48e4d8.zip chromium_src-5e0be64ec9fa6b9255c70d8982c9469cab48e4d8.tar.gz chromium_src-5e0be64ec9fa6b9255c70d8982c9469cab48e4d8.tar.bz2 |
Improving logging in /app, /base, /crypto and /ipc. Updating plain DCHECK() usages for DCHECK_EQ/LE/GE() equivalents.
BUG=58409
TEST=None
Review URL: http://codereview.chromium.org/6880166
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/cssm_init.cc | 20 | ||||
-rw-r--r-- | crypto/signature_creator_mac.cc | 4 | ||||
-rw-r--r-- | crypto/signature_verifier_mac.cc | 4 | ||||
-rw-r--r-- | crypto/signature_verifier_nss.cc | 2 | ||||
-rw-r--r-- | crypto/signature_verifier_win.cc | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/crypto/cssm_init.cc b/crypto/cssm_init.cc index 5a5e3cc..23c2660 100644 --- a/crypto/cssm_init.cc +++ b/crypto/cssm_init.cc @@ -99,46 +99,46 @@ class CSSMInitSingleton { crtn = CSSM_ModuleAttach(&gGuidAppleCSP, &version, &cssmMemoryFunctions, 0, CSSM_SERVICE_CSP, 0, CSSM_KEY_HIERARCHY_NONE, NULL, 0, NULL, &csp_handle_); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); crtn = CSSM_ModuleAttach(&gGuidAppleX509CL, &version, &cssmMemoryFunctions, 0, CSSM_SERVICE_CL, 0, CSSM_KEY_HIERARCHY_NONE, NULL, 0, NULL, &cl_handle_); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); crtn = CSSM_ModuleAttach(&gGuidAppleX509TP, &version, &cssmMemoryFunctions, 0, CSSM_SERVICE_TP, 0, CSSM_KEY_HIERARCHY_NONE, NULL, 0, NULL, &tp_handle_); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); } ~CSSMInitSingleton() { CSSM_RETURN crtn; if (csp_handle_) { CSSM_RETURN crtn = CSSM_ModuleDetach(csp_handle_); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); } if (cl_handle_) { CSSM_RETURN crtn = CSSM_ModuleDetach(cl_handle_); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); } if (tp_handle_) { CSSM_RETURN crtn = CSSM_ModuleDetach(tp_handle_); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); } if (csp_loaded_) { crtn = CSSM_ModuleUnload(&gGuidAppleCSP, NULL, NULL); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); } if (cl_loaded_) { crtn = CSSM_ModuleUnload(&gGuidAppleX509CL, NULL, NULL); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); } if (tp_loaded_) { crtn = CSSM_ModuleUnload(&gGuidAppleX509TP, NULL, NULL); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); } if (inited_) { crtn = CSSM_Terminate(); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); } } diff --git a/crypto/signature_creator_mac.cc b/crypto/signature_creator_mac.cc index fa0bded..544c9fb 100644 --- a/crypto/signature_creator_mac.cc +++ b/crypto/signature_creator_mac.cc @@ -45,7 +45,7 @@ SignatureCreator::~SignatureCreator() { CSSM_RETURN crtn; if (sig_handle_) { crtn = CSSM_DeleteContext(sig_handle_); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); } } @@ -54,7 +54,7 @@ bool SignatureCreator::Update(const uint8* data_part, int data_part_len) { data.Data = const_cast<uint8*>(data_part); data.Length = data_part_len; CSSM_RETURN crtn = CSSM_SignDataUpdate(sig_handle_, &data, 1); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); return true; } diff --git a/crypto/signature_verifier_mac.cc b/crypto/signature_verifier_mac.cc index 33cdfcf..d442720 100644 --- a/crypto/signature_verifier_mac.cc +++ b/crypto/signature_verifier_mac.cc @@ -74,7 +74,7 @@ void SignatureVerifier::VerifyUpdate(const uint8* data_part, data.Data = const_cast<uint8*>(data_part); data.Length = data_part_len; CSSM_RETURN crtn = CSSM_VerifyDataUpdate(sig_handle_, &data, 1); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); } bool SignatureVerifier::VerifyFinal() { @@ -92,7 +92,7 @@ void SignatureVerifier::Reset() { CSSM_RETURN crtn; if (sig_handle_) { crtn = CSSM_DeleteContext(sig_handle_); - DCHECK(crtn == CSSM_OK); + DCHECK_EQ(CSSM_OK, crtn); sig_handle_ = 0; } signature_.clear(); diff --git a/crypto/signature_verifier_nss.cc b/crypto/signature_verifier_nss.cc index cf82785..8a7fd4f 100644 --- a/crypto/signature_verifier_nss.cc +++ b/crypto/signature_verifier_nss.cc @@ -90,7 +90,7 @@ bool SignatureVerifier::VerifyInit(const uint8* signature_algorithm, void SignatureVerifier::VerifyUpdate(const uint8* data_part, int data_part_len) { SECStatus rv = VFY_Update(vfy_context_, data_part, data_part_len); - DCHECK(rv == SECSuccess); + DCHECK_EQ(SECSuccess, rv); } bool SignatureVerifier::VerifyFinal() { diff --git a/crypto/signature_verifier_win.cc b/crypto/signature_verifier_win.cc index 8bf094f..d294c4d 100644 --- a/crypto/signature_verifier_win.cc +++ b/crypto/signature_verifier_win.cc @@ -90,7 +90,7 @@ bool SignatureVerifier::VerifyInit(const uint8* signature_algorithm, else if (!strcmp(signature_algorithm_id->pszObjId, szOID_RSA_MD5RSA)) hash_alg_id = CALG_MD5; free(signature_algorithm_id); - DCHECK(hash_alg_id != CALG_MD4); + DCHECK_NE(static_cast<ALG_ID>(CALG_MD4), hash_alg_id); if (hash_alg_id == CALG_MD4) return false; // Unsupported hash algorithm. } else if (GetLastError() == ERROR_FILE_NOT_FOUND) { |