From aee0db0e6a12bdaacebeb8fb791f4e0d45e18a0d Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 21 Sep 2017 16:53:58 -0400 Subject: Move CFX_UnownedPtr to UnownedPtr This CL moves CFX_UnownedPtr to UnownedPtr and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I6d1fa463f365e5cb3aafa8c8a7a5f7eff62ed8e0 Reviewed-on: https://pdfium-review.googlesource.com/14620 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- core/fpdfapi/parser/cfdf_document.h | 4 ++-- core/fpdfapi/parser/cpdf_data_avail.cpp | 2 +- core/fpdfapi/parser/cpdf_data_avail.h | 4 ++-- core/fpdfapi/parser/cpdf_document.h | 2 +- core/fpdfapi/parser/cpdf_hint_tables.h | 6 +++--- core/fpdfapi/parser/cpdf_object_avail.h | 6 +++--- core/fpdfapi/parser/cpdf_object_unittest.cpp | 6 +++--- core/fpdfapi/parser/cpdf_parser.h | 6 +++--- core/fpdfapi/parser/cpdf_read_validator.h | 6 +++--- core/fpdfapi/parser/cpdf_reference.h | 4 ++-- core/fpdfapi/parser/cpdf_security_handler.h | 4 ++-- core/fpdfapi/parser/cpdf_stream_acc.h | 2 +- 12 files changed, 26 insertions(+), 26 deletions(-) (limited to 'core/fpdfapi/parser') diff --git a/core/fpdfapi/parser/cfdf_document.h b/core/fpdfapi/parser/cfdf_document.h index 9065621ea7..743c5c0eaa 100644 --- a/core/fpdfapi/parser/cfdf_document.h +++ b/core/fpdfapi/parser/cfdf_document.h @@ -11,7 +11,7 @@ #include "core/fpdfapi/parser/cpdf_indirect_object_holder.h" #include "core/fpdfapi/parser/cpdf_object.h" -#include "core/fxcrt/cfx_unowned_ptr.h" +#include "core/fxcrt/unowned_ptr.h" class CPDF_Dictionary; class IFX_SeekableReadStream; @@ -33,7 +33,7 @@ class CFDF_Document : public CPDF_IndirectObjectHolder { protected: void ParseStream(const RetainPtr& pFile); - CFX_UnownedPtr m_pRootDict; + UnownedPtr m_pRootDict; RetainPtr m_pFile; }; diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp index 5dd6285526..98afd450d7 100644 --- a/core/fpdfapi/parser/cpdf_data_avail.cpp +++ b/core/fpdfapi/parser/cpdf_data_avail.cpp @@ -65,7 +65,7 @@ class HintsScope { ~HintsScope() { validator_->SetDownloadHints(nullptr); } private: - CFX_UnownedPtr validator_; + UnownedPtr validator_; }; } // namespace diff --git a/core/fpdfapi/parser/cpdf_data_avail.h b/core/fpdfapi/parser/cpdf_data_avail.h index f48abb5be0..ab7f045fec 100644 --- a/core/fpdfapi/parser/cpdf_data_avail.h +++ b/core/fpdfapi/parser/cpdf_data_avail.h @@ -13,7 +13,7 @@ #include "core/fpdfapi/parser/cpdf_parser.h" #include "core/fpdfapi/parser/cpdf_syntax_parser.h" -#include "core/fxcrt/cfx_unowned_ptr.h" +#include "core/fxcrt/unowned_ptr.h" class CPDF_Dictionary; class CPDF_HintTables; @@ -185,7 +185,7 @@ class CPDF_DataAvail final { uint32_t m_dwRootObjNum; uint32_t m_dwInfoObjNum; std::unique_ptr m_pLinearized; - CFX_UnownedPtr m_pTrailer; + UnownedPtr m_pTrailer; bool m_bDocAvail; FX_FILESIZE m_dwHeaderOffset; FX_FILESIZE m_dwLastXRefOffset; diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h index 1b985dd7e1..c087254286 100644 --- a/core/fpdfapi/parser/cpdf_document.h +++ b/core/fpdfapi/parser/cpdf_document.h @@ -137,7 +137,7 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { // TODO(tsepez): figure out why tests break if this is an UnownedPtr. CPDF_Dictionary* m_pRootDict; // Not owned. - CFX_UnownedPtr m_pInfoDict; + UnownedPtr m_pInfoDict; // Vector of pairs to know current position in the page tree. The index in the // vector corresponds to the level being described. The pair contains a diff --git a/core/fpdfapi/parser/cpdf_hint_tables.h b/core/fpdfapi/parser/cpdf_hint_tables.h index e9647b1796..9658be5462 100644 --- a/core/fpdfapi/parser/cpdf_hint_tables.h +++ b/core/fpdfapi/parser/cpdf_hint_tables.h @@ -10,8 +10,8 @@ #include #include "core/fpdfapi/parser/cpdf_data_avail.h" -#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_stream.h" +#include "core/fxcrt/unowned_ptr.h" class CFX_BitStream; class CPDF_LinearizedHeader; @@ -49,10 +49,10 @@ class CPDF_HintTables { const std::vector& szArray); // Owner, outlives this object. - CFX_UnownedPtr const m_pDataAvail; + UnownedPtr const m_pDataAvail; // Owned by |m_pDataAvail|. - CFX_UnownedPtr const m_pLinearized; + UnownedPtr const m_pLinearized; uint32_t m_nFirstPageSharedObjs; FX_FILESIZE m_szFirstPageObjOffset; diff --git a/core/fpdfapi/parser/cpdf_object_avail.h b/core/fpdfapi/parser/cpdf_object_avail.h index bd46cdba5c..040cec7252 100644 --- a/core/fpdfapi/parser/cpdf_object_avail.h +++ b/core/fpdfapi/parser/cpdf_object_avail.h @@ -10,8 +10,8 @@ #include #include "core/fpdfapi/parser/cpdf_data_avail.h" -#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/maybe_owned.h" +#include "core/fxcrt/unowned_ptr.h" class CPDF_Object; class CPDF_Reference; @@ -42,8 +42,8 @@ class CPDF_ObjectAvail { void CleanMemory(); bool HasObjectParsed(uint32_t obj_num) const; - CFX_UnownedPtr validator_; - CFX_UnownedPtr holder_; + UnownedPtr validator_; + UnownedPtr holder_; MaybeOwned root_; std::set parsed_objnums_; std::stack non_parsed_objects_; diff --git a/core/fpdfapi/parser/cpdf_object_unittest.cpp b/core/fpdfapi/parser/cpdf_object_unittest.cpp index 770c718431..4b16021069 100644 --- a/core/fpdfapi/parser/cpdf_object_unittest.cpp +++ b/core/fpdfapi/parser/cpdf_object_unittest.cpp @@ -177,9 +177,9 @@ class PDFObjectsTest : public testing::Test { std::vector> m_DirectObjs; std::vector m_DirectObjTypes; std::vector> m_RefObjs; - CFX_UnownedPtr m_DictObj; - CFX_UnownedPtr m_StreamDictObj; - CFX_UnownedPtr m_ArrayObj; + UnownedPtr m_DictObj; + UnownedPtr m_StreamDictObj; + UnownedPtr m_ArrayObj; std::vector m_IndirectObjs; }; diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h index f59691fe36..fe3fe1084f 100644 --- a/core/fpdfapi/parser/cpdf_parser.h +++ b/core/fpdfapi/parser/cpdf_parser.h @@ -14,10 +14,10 @@ #include #include "core/fpdfapi/parser/cpdf_syntax_parser.h" -#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" #include "core/fxcrt/retain_ptr.h" +#include "core/fxcrt/unowned_ptr.h" class CPDF_Array; class CPDF_CryptoHandler; @@ -191,11 +191,11 @@ class CPDF_Parser { bool InitSyntaxParser(const RetainPtr& file_access); bool ParseFileVersion(); - CFX_UnownedPtr m_pDocument; + UnownedPtr m_pDocument; bool m_bHasParsed; bool m_bXRefStream; int m_FileVersion; - CFX_UnownedPtr m_pEncryptDict; + UnownedPtr m_pEncryptDict; FX_FILESIZE m_LastXRefOffset; std::unique_ptr m_pSecurityHandler; ByteString m_Password; diff --git a/core/fpdfapi/parser/cpdf_read_validator.h b/core/fpdfapi/parser/cpdf_read_validator.h index 812a5ccb1b..0bbf6ab924 100644 --- a/core/fpdfapi/parser/cpdf_read_validator.h +++ b/core/fpdfapi/parser/cpdf_read_validator.h @@ -19,7 +19,7 @@ class CPDF_ReadValidator : public IFX_SeekableReadStream { ~Session(); private: - CFX_UnownedPtr validator_; + UnownedPtr validator_; bool saved_read_error_; bool saved_has_unavailable_data_; }; @@ -56,9 +56,9 @@ class CPDF_ReadValidator : public IFX_SeekableReadStream { void ScheduleDownload(FX_FILESIZE offset, size_t size); RetainPtr file_read_; - CFX_UnownedPtr file_avail_; + UnownedPtr file_avail_; - CFX_UnownedPtr hints_; + UnownedPtr hints_; bool read_error_; bool has_unavailable_data_; diff --git a/core/fpdfapi/parser/cpdf_reference.h b/core/fpdfapi/parser/cpdf_reference.h index f564ab5b9b..b472b4a3ac 100644 --- a/core/fpdfapi/parser/cpdf_reference.h +++ b/core/fpdfapi/parser/cpdf_reference.h @@ -11,7 +11,7 @@ #include #include "core/fpdfapi/parser/cpdf_object.h" -#include "core/fxcrt/cfx_unowned_ptr.h" +#include "core/fxcrt/unowned_ptr.h" class CPDF_IndirectObjectHolder; @@ -43,7 +43,7 @@ class CPDF_Reference : public CPDF_Object { std::set* pVisited) const override; CPDF_Object* SafeGetDirect() const; - CFX_UnownedPtr m_pObjList; + UnownedPtr m_pObjList; uint32_t m_RefObjNum; }; diff --git a/core/fpdfapi/parser/cpdf_security_handler.h b/core/fpdfapi/parser/cpdf_security_handler.h index eb7d13f2e6..656aba0058 100644 --- a/core/fpdfapi/parser/cpdf_security_handler.h +++ b/core/fpdfapi/parser/cpdf_security_handler.h @@ -97,8 +97,8 @@ class CPDF_SecurityHandler { int m_Version; int m_Revision; - CFX_UnownedPtr m_pParser; - CFX_UnownedPtr m_pEncryptDict; + UnownedPtr m_pParser; + UnownedPtr m_pEncryptDict; uint32_t m_Permissions; int m_Cipher; uint8_t m_EncryptKey[32]; diff --git a/core/fpdfapi/parser/cpdf_stream_acc.h b/core/fpdfapi/parser/cpdf_stream_acc.h index a6cca095a6..a8a2540880 100644 --- a/core/fpdfapi/parser/cpdf_stream_acc.h +++ b/core/fpdfapi/parser/cpdf_stream_acc.h @@ -47,7 +47,7 @@ class CPDF_StreamAcc : public Retainable { bool m_bNewBuf; ByteString m_ImageDecoder; CPDF_Dictionary* m_pImageParam; - CFX_UnownedPtr const m_pStream; + UnownedPtr const m_pStream; uint8_t* m_pSrcData; }; -- cgit v1.2.3