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

Unified Diff: core/include/fpdfapi/fpdf_parser.h

Issue 1292613003: Use override in more classes in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nit Created 5 years, 4 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 | « core/include/fpdfapi/fpdf_pageobj.h ('k') | core/include/fpdfapi/fpdf_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/fpdf_parser.h
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index cb4e15e25d5e776495ded320fd3ef3272739032a..a83cec194cbc631eb2cb79394cbbb29ff3b6f7a7 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,
« no previous file with comments | « core/include/fpdfapi/fpdf_pageobj.h ('k') | core/include/fpdfapi/fpdf_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698