diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2017-10-02 22:07:55 +0300 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-03 14:10:19 +0000 |
commit | 62b218074ea2bc658488c583362930a798b39107 (patch) | |
tree | 634ff6930024868b1956c5bfe796cfa4894df2c9 /fpdfsdk/fpdf_dataavail.cpp | |
parent | 0feba6f9ef721e4927e37da68ac27572ffae1453 (diff) | |
download | pdfium-62b218074ea2bc658488c583362930a798b39107.tar.xz |
Improve CPDF_ReadVaildator
Merge CPDF_ReadValidator::IsXXXAvailable and CPDF_ReadValidator::SheduleXXXDowload
methods into one CheckXXXAndRequestIfUnavailable.
Change-Id: Ib108d5bc3589df17269c841b0024dd4690909304
Reviewed-on: https://pdfium-review.googlesource.com/13730
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'fpdfsdk/fpdf_dataavail.cpp')
-rw-r--r-- | fpdfsdk/fpdf_dataavail.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/fpdf_dataavail.cpp b/fpdfsdk/fpdf_dataavail.cpp index 3e1f713477..0a74c9c245 100644 --- a/fpdfsdk/fpdf_dataavail.cpp +++ b/fpdfsdk/fpdf_dataavail.cpp @@ -51,7 +51,7 @@ class FPDF_FileAvailContext : public CPDF_DataAvail::FileAvail { void Set(FX_FILEAVAIL* pfileAvail) { m_pfileAvail = pfileAvail; } // CPDF_DataAvail::FileAvail: - bool IsDataAvail(FX_FILESIZE offset, uint32_t size) override { + bool IsDataAvail(FX_FILESIZE offset, size_t size) override { return !!m_pfileAvail->IsDataAvail(m_pfileAvail, offset, size); } @@ -91,7 +91,7 @@ class FPDF_DownloadHintsContext : public CPDF_DataAvail::DownloadHints { public: // IFX_DownloadHints - void AddSegment(FX_FILESIZE offset, uint32_t size) override { + void AddSegment(FX_FILESIZE offset, size_t size) override { if (m_pDownloadHints) m_pDownloadHints->AddSegment(m_pDownloadHints, offset, size); } |