summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-21 16:53:58 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-21 21:25:26 +0000
commitaee0db0e6a12bdaacebeb8fb791f4e0d45e18a0d (patch)
tree1e14d60adcffeb0791a0a6c8792d3e9c0109384e /core/fpdfapi/parser
parent8e9e3d8975eeea3429c3b3ea703f04ac34e20e28 (diff)
downloadpdfium-aee0db0e6a12bdaacebeb8fb791f4e0d45e18a0d.tar.xz
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 <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cfdf_document.h4
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.h4
-rw-r--r--core/fpdfapi/parser/cpdf_document.h2
-rw-r--r--core/fpdfapi/parser/cpdf_hint_tables.h6
-rw-r--r--core/fpdfapi/parser/cpdf_object_avail.h6
-rw-r--r--core/fpdfapi/parser/cpdf_object_unittest.cpp6
-rw-r--r--core/fpdfapi/parser/cpdf_parser.h6
-rw-r--r--core/fpdfapi/parser/cpdf_read_validator.h6
-rw-r--r--core/fpdfapi/parser/cpdf_reference.h4
-rw-r--r--core/fpdfapi/parser/cpdf_security_handler.h4
-rw-r--r--core/fpdfapi/parser/cpdf_stream_acc.h2
12 files changed, 26 insertions, 26 deletions
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<IFX_SeekableReadStream>& pFile);
- CFX_UnownedPtr<CPDF_Dictionary> m_pRootDict;
+ UnownedPtr<CPDF_Dictionary> m_pRootDict;
RetainPtr<IFX_SeekableReadStream> 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<CPDF_ReadValidator> validator_;
+ UnownedPtr<CPDF_ReadValidator> 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<CPDF_LinearizedHeader> m_pLinearized;
- CFX_UnownedPtr<CPDF_Object> m_pTrailer;
+ UnownedPtr<CPDF_Object> 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<CPDF_Dictionary> m_pInfoDict;
+ UnownedPtr<CPDF_Dictionary> 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 <vector>
#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<FX_FILESIZE>& szArray);
// Owner, outlives this object.
- CFX_UnownedPtr<CPDF_DataAvail> const m_pDataAvail;
+ UnownedPtr<CPDF_DataAvail> const m_pDataAvail;
// Owned by |m_pDataAvail|.
- CFX_UnownedPtr<CPDF_LinearizedHeader> const m_pLinearized;
+ UnownedPtr<CPDF_LinearizedHeader> 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 <stack>
#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<CPDF_ReadValidator> validator_;
- CFX_UnownedPtr<CPDF_IndirectObjectHolder> holder_;
+ UnownedPtr<CPDF_ReadValidator> validator_;
+ UnownedPtr<CPDF_IndirectObjectHolder> holder_;
MaybeOwned<const CPDF_Object> root_;
std::set<uint32_t> parsed_objnums_;
std::stack<uint32_t> 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<std::unique_ptr<CPDF_Object>> m_DirectObjs;
std::vector<int> m_DirectObjTypes;
std::vector<std::unique_ptr<CPDF_Object>> m_RefObjs;
- CFX_UnownedPtr<CPDF_Dictionary> m_DictObj;
- CFX_UnownedPtr<CPDF_Dictionary> m_StreamDictObj;
- CFX_UnownedPtr<CPDF_Array> m_ArrayObj;
+ UnownedPtr<CPDF_Dictionary> m_DictObj;
+ UnownedPtr<CPDF_Dictionary> m_StreamDictObj;
+ UnownedPtr<CPDF_Array> m_ArrayObj;
std::vector<CPDF_Object*> 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 <vector>
#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<IFX_SeekableReadStream>& file_access);
bool ParseFileVersion();
- CFX_UnownedPtr<CPDF_Document> m_pDocument;
+ UnownedPtr<CPDF_Document> m_pDocument;
bool m_bHasParsed;
bool m_bXRefStream;
int m_FileVersion;
- CFX_UnownedPtr<CPDF_Dictionary> m_pEncryptDict;
+ UnownedPtr<CPDF_Dictionary> m_pEncryptDict;
FX_FILESIZE m_LastXRefOffset;
std::unique_ptr<CPDF_SecurityHandler> 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<CPDF_ReadValidator> validator_;
+ UnownedPtr<CPDF_ReadValidator> 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<IFX_SeekableReadStream> file_read_;
- CFX_UnownedPtr<CPDF_DataAvail::FileAvail> file_avail_;
+ UnownedPtr<CPDF_DataAvail::FileAvail> file_avail_;
- CFX_UnownedPtr<CPDF_DataAvail::DownloadHints> hints_;
+ UnownedPtr<CPDF_DataAvail::DownloadHints> 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 <set>
#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<const CPDF_Object*>* pVisited) const override;
CPDF_Object* SafeGetDirect() const;
- CFX_UnownedPtr<CPDF_IndirectObjectHolder> m_pObjList;
+ UnownedPtr<CPDF_IndirectObjectHolder> 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<CPDF_Parser> m_pParser;
- CFX_UnownedPtr<CPDF_Dictionary> m_pEncryptDict;
+ UnownedPtr<CPDF_Parser> m_pParser;
+ UnownedPtr<CPDF_Dictionary> 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 CPDF_Stream> const m_pStream;
+ UnownedPtr<const CPDF_Stream> const m_pStream;
uint8_t* m_pSrcData;
};