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

Side by Side Diff: core/fpdfapi/parser/cpdf_syntax_parser.h

Issue 2509123002: Make CPDF_Object subclass constructors intern strings (Closed)
Patch Set: Nits Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « core/fpdfapi/parser/cpdf_string.cpp ('k') | core/fpdfapi/parser/cpdf_syntax_parser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_ 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_
8 #define CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_ 8 #define CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const CFX_ByteStringC& tag, 72 const CFX_ByteStringC& tag,
73 bool checkKeyword); 73 bool checkKeyword);
74 74
75 CFX_ByteString ReadString(); 75 CFX_ByteString ReadString();
76 CFX_ByteString ReadHexString(); 76 CFX_ByteString ReadHexString();
77 unsigned int ReadEOLMarkers(FX_FILESIZE pos); 77 unsigned int ReadEOLMarkers(FX_FILESIZE pos);
78 std::unique_ptr<CPDF_Stream> ReadStream(CPDF_Dictionary* pDict, 78 std::unique_ptr<CPDF_Stream> ReadStream(CPDF_Dictionary* pDict,
79 uint32_t objnum, 79 uint32_t objnum,
80 uint32_t gennum); 80 uint32_t gennum);
81 81
82 CFX_ByteString MaybeIntern(const CFX_ByteString& str);
83 inline bool CheckPosition(FX_FILESIZE pos) { 82 inline bool CheckPosition(FX_FILESIZE pos) {
84 return m_BufOffset >= pos || 83 return m_BufOffset >= pos ||
85 static_cast<FX_FILESIZE>(m_BufOffset + m_BufSize) <= pos; 84 static_cast<FX_FILESIZE>(m_BufOffset + m_BufSize) <= pos;
86 } 85 }
87 86
88 FX_FILESIZE m_Pos; 87 FX_FILESIZE m_Pos;
89 uint32_t m_MetadataObjnum; 88 uint32_t m_MetadataObjnum;
90 IFX_SeekableReadStream* m_pFileAccess; 89 IFX_SeekableReadStream* m_pFileAccess;
91 FX_FILESIZE m_HeaderOffset; 90 FX_FILESIZE m_HeaderOffset;
92 FX_FILESIZE m_FileLen; 91 FX_FILESIZE m_FileLen;
93 uint8_t* m_pFileBuf; 92 uint8_t* m_pFileBuf;
94 uint32_t m_BufSize; 93 uint32_t m_BufSize;
95 FX_FILESIZE m_BufOffset; 94 FX_FILESIZE m_BufOffset;
96 std::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler; 95 std::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler;
97 uint8_t m_WordBuffer[257]; 96 uint8_t m_WordBuffer[257];
98 uint32_t m_WordSize; 97 uint32_t m_WordSize;
99 CFX_WeakPtr<CFX_ByteStringPool> m_pPool; 98 CFX_WeakPtr<CFX_ByteStringPool> m_pPool;
100 }; 99 };
101 100
102 #endif // CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_ 101 #endif // CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/parser/cpdf_string.cpp ('k') | core/fpdfapi/parser/cpdf_syntax_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698