Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2239)

Unified Diff: core/include/fpdfapi/fpdf_parser.h

Issue 1772973002: Completely de-virtualize CPDF_SyntaxParser. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Unfriend CPDF_SyntaxParser Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fpdfapi/fpdf_objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/fpdf_parser.h
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index 5903e82a1687f20976566f9cabc0e6e9ea8997fe..b554673d80c029f7bba02e16d0d6b3fc8230b3fa 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -234,7 +234,7 @@ class CPDF_SimpleParser {
class CPDF_SyntaxParser {
public:
CPDF_SyntaxParser();
- virtual ~CPDF_SyntaxParser();
+ ~CPDF_SyntaxParser();
void InitParser(IFX_FileRead* pFileAccess, FX_DWORD HeaderOffset);
@@ -268,7 +268,7 @@ class CPDF_SyntaxParser {
FX_BOOL GetCharAt(FX_FILESIZE pos, uint8_t& ch);
CFX_ByteString GetNextWord(bool* bIsNumber);
- protected:
+ private:
friend class CPDF_Parser;
friend class CPDF_DataAvail;
friend class fpdf_parser_parser_ReadHexString_Test;
@@ -276,23 +276,19 @@ class CPDF_SyntaxParser {
static const int kParserMaxRecursionDepth = 64;
static int s_CurrentRecursionDepth;
- virtual FX_BOOL GetNextChar(uint8_t& ch);
+ uint32_t GetDirectNum();
+ FX_BOOL GetNextChar(uint8_t& ch);
FX_BOOL GetCharAtBackward(FX_FILESIZE pos, uint8_t& ch);
-
void GetNextWordInternal(bool* bIsNumber);
-
bool IsWholeWord(FX_FILESIZE startpos,
FX_FILESIZE limit,
const CFX_ByteStringC& tag,
FX_BOOL checkKeyword);
CFX_ByteString ReadString();
-
CFX_ByteString ReadHexString();
-
unsigned int ReadEOLMarkers(FX_FILESIZE pos);
-
CPDF_Stream* ReadStream(CPDF_Dictionary* pDict,
FX_DWORD objnum,
FX_DWORD gennum);
@@ -308,9 +304,6 @@ class CPDF_SyntaxParser {
std::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler;
uint8_t m_WordBuffer[257];
FX_DWORD m_WordSize;
-
- private:
- uint32_t GetDirectNum();
};
class CPDF_Parser {
« no previous file with comments | « core/include/fpdfapi/fpdf_objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698