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

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_security_handler.cpp

Issue 1999313002: Change CPDF_Boolean to use bool instead of FX_BOOL. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@interform
Patch Set: rebase Created 4 years, 7 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
Index: core/fpdfapi/fpdf_parser/cpdf_security_handler.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_security_handler.cpp b/core/fpdfapi/fpdf_parser/cpdf_security_handler.cpp
index 94ef042bc0a80ca6248cb851f65539cc1f301291..054266765aed8b87507287cb68a08b4a0fe88e58 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_security_handler.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_security_handler.cpp
@@ -512,8 +512,9 @@ FX_BOOL CPDF_SecurityHandler::CheckOwnerPassword(const uint8_t* password,
return CheckUserPassword(user_pass.raw_str(), user_pass.GetLength(), TRUE,
key, key_len);
}
-FX_BOOL CPDF_SecurityHandler::IsMetadataEncrypted() {
- return m_pEncryptDict->GetBooleanBy("EncryptMetadata", TRUE);
+
+bool CPDF_SecurityHandler::IsMetadataEncrypted() const {
+ return m_pEncryptDict->GetBooleanBy("EncryptMetadata", true);
}
void CPDF_SecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict,
@@ -545,7 +546,7 @@ void CPDF_SecurityHandler::OnCreate(CPDF_Dictionary* pEncryptDict,
AES256_SetPassword(pEncryptDict, owner_pass, owner_size, TRUE,
m_EncryptKey);
AES256_SetPerms(pEncryptDict, m_Permissions,
- pEncryptDict->GetBooleanBy("EncryptMetadata", TRUE),
+ pEncryptDict->GetBooleanBy("EncryptMetadata", true),
m_EncryptKey);
}
return;
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_security_handler.h ('k') | core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698