diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2017-08-14 23:28:58 +0300 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-14 21:06:50 +0000 |
commit | 93c886b7ce59f6e65fe885330558c52f51cfcab9 (patch) | |
tree | cbe793ac961648e0dddc69c36992f2bcfdd4ad77 /core/fpdfapi/parser/cpdf_data_avail.h | |
parent | 2d883813f969dcb88e240b6bd7bcd5af9e782331 (diff) | |
download | pdfium-93c886b7ce59f6e65fe885330558c52f51cfcab9.tar.xz |
Refactoring of CPDF_DataAvail::AreObjectsAvailable.chromium/3186
Use ReadValidator to request exact data on object read.
Change-Id: Ie6c3f452e119fa3514e77f1824473c33bb6b855a
Reviewed-on: https://pdfium-review.googlesource.com/10491
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_data_avail.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_data_avail.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/fpdfapi/parser/cpdf_data_avail.h b/core/fpdfapi/parser/cpdf_data_avail.h index f19b36d375..b857c659d9 100644 --- a/core/fpdfapi/parser/cpdf_data_avail.h +++ b/core/fpdfapi/parser/cpdf_data_avail.h @@ -111,6 +111,7 @@ class CPDF_DataAvail final { CFX_RetainPtr<IFX_SeekableReadStream> GetFileRead() const; int GetPageCount() const; CPDF_Dictionary* GetPage(int index); + CFX_RetainPtr<CPDF_ReadValidator> GetValidator() const; protected: class PageNode { @@ -128,7 +129,6 @@ class CPDF_DataAvail final { uint32_t GetObjectSize(uint32_t objnum, FX_FILESIZE& offset); bool AreObjectsAvailable(std::vector<CPDF_Object*>& obj_array, bool bParsePage, - DownloadHints* pHints, std::vector<CPDF_Object*>& ret_array); bool CheckDocStatus(DownloadHints* pHints); bool CheckHeader(DownloadHints* pHints); @@ -142,10 +142,10 @@ class CPDF_DataAvail final { bool CheckInfo(DownloadHints* pHints); bool CheckPages(DownloadHints* pHints); bool CheckPage(DownloadHints* pHints); - bool CheckResources(DownloadHints* pHints); + bool CheckResources(); bool CheckAnnots(DownloadHints* pHints); bool CheckAcroForm(DownloadHints* pHints); - bool CheckAcroFormSubObject(DownloadHints* pHints); + bool CheckAcroFormSubObject(); bool CheckTrailerAppend(DownloadHints* pHints); bool CheckPageStatus(DownloadHints* pHints); bool CheckAllCrossRefStream(DownloadHints* pHints); @@ -168,10 +168,9 @@ class CPDF_DataAvail final { bool LoadAllXref(DownloadHints* pHints); bool LoadAllFile(DownloadHints* pHints); DocAvailStatus CheckLinearizedData(DownloadHints* pHints); - bool CheckPageAnnots(uint32_t dwPage, DownloadHints* pHints); + bool CheckPageAnnots(uint32_t dwPage); - DocAvailStatus CheckLinearizedFirstPage(uint32_t dwPage, - DownloadHints* pHints); + DocAvailStatus CheckLinearizedFirstPage(uint32_t dwPage); bool CheckPage(uint32_t dwPage, DownloadHints* pHints); bool LoadDocPages(DownloadHints* pHints); bool LoadDocPage(uint32_t dwPage, DownloadHints* pHints); |