summaryrefslogtreecommitdiff
path: root/core/include/fpdfapi/fpdf_parser.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-14 14:07:43 -0700
committerLei Zhang <thestig@chromium.org>2015-08-14 14:07:43 -0700
commitc2c3f7b5f0396409451a9d344f35ec1929a76e9f (patch)
treeb1c696afdca13e8087e18014b19a6c82415f72d5 /core/include/fpdfapi/fpdf_parser.h
parentc6540e037ed1a9546d5a90455bf440a24b181ab4 (diff)
downloadpdfium-c2c3f7b5f0396409451a9d344f35ec1929a76e9f.tar.xz
Use override in more classes in core/
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1292613003 .
Diffstat (limited to 'core/include/fpdfapi/fpdf_parser.h')
-rw-r--r--core/include/fpdfapi/fpdf_parser.h66
1 files changed, 34 insertions, 32 deletions
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index cb4e15e25d..a83cec194c 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -547,17 +547,18 @@ class CPDF_SecurityHandler {
class CPDF_StandardSecurityHandler : public CPDF_SecurityHandler {
public:
CPDF_StandardSecurityHandler();
-
- virtual ~CPDF_StandardSecurityHandler();
- virtual FX_BOOL OnInit(CPDF_Parser* pParser, CPDF_Dictionary* pEncryptDict);
- virtual FX_DWORD GetPermissions();
- virtual FX_BOOL IsOwner() { return m_bOwner; }
- virtual FX_BOOL GetCryptInfo(int& cipher,
- const uint8_t*& buffer,
- int& keylen);
- virtual FX_BOOL IsMetadataEncrypted();
- virtual CPDF_CryptoHandler* CreateCryptoHandler();
- virtual CPDF_StandardSecurityHandler* GetStandardHandler() { return this; }
+ ~CPDF_StandardSecurityHandler() override;
+
+ // CPDF_SecurityHandler
+ FX_BOOL OnInit(CPDF_Parser* pParser, CPDF_Dictionary* pEncryptDict) override;
+ FX_DWORD GetPermissions() override;
+ FX_BOOL IsOwner() override { return m_bOwner; }
+ FX_BOOL GetCryptInfo(int& cipher,
+ const uint8_t*& buffer,
+ int& keylen) override;
+ FX_BOOL IsMetadataEncrypted() override;
+ CPDF_CryptoHandler* CreateCryptoHandler() override;
+ CPDF_StandardSecurityHandler* GetStandardHandler() override { return this; }
void OnCreate(CPDF_Dictionary* pEncryptDict,
CPDF_Array* pIdArray,
@@ -683,29 +684,30 @@ class CPDF_CryptoHandler {
class CPDF_StandardCryptoHandler : public CPDF_CryptoHandler {
public:
CPDF_StandardCryptoHandler();
-
- virtual ~CPDF_StandardCryptoHandler();
+ ~CPDF_StandardCryptoHandler() override;
+
+ // CPDF_CryptoHandler
+ FX_BOOL Init(CPDF_Dictionary* pEncryptDict,
+ CPDF_SecurityHandler* pSecurityHandler) override;
+ FX_DWORD DecryptGetSize(FX_DWORD src_size) override;
+ void* DecryptStart(FX_DWORD objnum, FX_DWORD gennum) override;
+ FX_BOOL DecryptStream(void* context,
+ const uint8_t* src_buf,
+ FX_DWORD src_size,
+ CFX_BinaryBuf& dest_buf) override;
+ FX_BOOL DecryptFinish(void* context, CFX_BinaryBuf& dest_buf) override;
+ FX_DWORD EncryptGetSize(FX_DWORD objnum,
+ FX_DWORD version,
+ const uint8_t* src_buf,
+ FX_DWORD src_size) override;
+ FX_BOOL EncryptContent(FX_DWORD objnum,
+ FX_DWORD version,
+ const uint8_t* src_buf,
+ FX_DWORD src_size,
+ uint8_t* dest_buf,
+ FX_DWORD& dest_size) override;
FX_BOOL Init(int cipher, const uint8_t* key, int keylen);
- virtual FX_BOOL Init(CPDF_Dictionary* pEncryptDict,
- CPDF_SecurityHandler* pSecurityHandler);
- virtual FX_DWORD DecryptGetSize(FX_DWORD src_size);
- virtual void* DecryptStart(FX_DWORD objnum, FX_DWORD gennum);
- virtual FX_BOOL DecryptStream(void* context,
- const uint8_t* src_buf,
- FX_DWORD src_size,
- CFX_BinaryBuf& dest_buf);
- virtual FX_BOOL DecryptFinish(void* context, CFX_BinaryBuf& dest_buf);
- virtual FX_DWORD EncryptGetSize(FX_DWORD objnum,
- FX_DWORD version,
- const uint8_t* src_buf,
- FX_DWORD src_size);
- virtual FX_BOOL EncryptContent(FX_DWORD objnum,
- FX_DWORD version,
- const uint8_t* src_buf,
- FX_DWORD src_size,
- uint8_t* dest_buf,
- FX_DWORD& dest_size);
protected:
virtual void CryptBlock(FX_BOOL bEncrypt,