diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-04-12 16:50:51 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-13 06:00:01 +0000 |
commit | e0b592236db902e3e8cbca7ec64f8e2b192e1935 (patch) | |
tree | c77a5264e2a2f35c454471941045d3ccb0fe1172 /core/fpdfapi/parser/cpdf_syntax_parser.h | |
parent | d20e3880234a35a558237316cac5d70fff4224bc (diff) | |
download | pdfium-e0b592236db902e3e8cbca7ec64f8e2b192e1935.tar.xz |
Refcount CPDF_CryptoHandlerchromium/3076chromium/3075chromium/3074chromium/3073chromium/3072
Avoid tracking ownership via m_bLocalCryptoHandler.
Also remove m_bEncryptCloned, as it is always false.
Replace some methods with direct calls to underlying code.
Change-Id: Ifa9d6f721c59d07e3b8e258f76832ca9f2ea0fc9
Reviewed-on: https://pdfium-review.googlesource.com/4111
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_syntax_parser.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_syntax_parser.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.h b/core/fpdfapi/parser/cpdf_syntax_parser.h index 8dd9103f1b..9c2d84070d 100644 --- a/core/fpdfapi/parser/cpdf_syntax_parser.h +++ b/core/fpdfapi/parser/cpdf_syntax_parser.h @@ -51,7 +51,7 @@ class CPDF_SyntaxParser { FX_FILESIZE limit); FX_FILESIZE FindTag(const CFX_ByteStringC& tag, FX_FILESIZE limit); - void SetEncrypt(std::unique_ptr<CPDF_CryptoHandler> pCryptoHandler); + void SetEncrypt(const CFX_RetainPtr<CPDF_CryptoHandler>& pCryptoHandler); bool ReadBlock(uint8_t* pBuf, uint32_t size); bool GetCharAt(FX_FILESIZE pos, uint8_t& ch); CFX_ByteString GetNextWord(bool* bIsNumber); @@ -95,7 +95,7 @@ class CPDF_SyntaxParser { uint8_t* m_pFileBuf; uint32_t m_BufSize; FX_FILESIZE m_BufOffset; - std::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler; + CFX_RetainPtr<CPDF_CryptoHandler> m_pCryptoHandler; uint8_t m_WordBuffer[257]; uint32_t m_WordSize; CFX_WeakPtr<CFX_ByteStringPool> m_pPool; |