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

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

Issue 2275773003: Flip document and parser ownership (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@private_parser
Patch Set: Rebase to master Created 4 years, 4 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/fpdfapi/fpdf_parser/include/cpdf_document.h ('k') | fpdfsdk/fpdf_dataavail.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/include/cpdf_parser.h
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_parser.h b/core/fpdfapi/fpdf_parser/include/cpdf_parser.h
index a69f0fe38eb49cea32fdc7563a4cf5abb00ddac6..d6a5d5703b7088a94495b20d034e31e971bba763 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_parser.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_parser.h
@@ -37,17 +37,14 @@ class CPDF_Parser {
CPDF_Parser();
~CPDF_Parser();
- Error StartParse(IFX_FileRead* pFile,
- std::unique_ptr<CPDF_Document> pDocument);
-
- Error StartLinearizedParse(IFX_FileRead* pFile,
- std::unique_ptr<CPDF_Document> pDocument);
+ Error StartParse(IFX_FileRead* pFile, CPDF_Document* pDocument);
+ Error StartLinearizedParse(IFX_FileRead* pFile, CPDF_Document* pDocument);
void SetPassword(const FX_CHAR* password) { m_Password = password; }
CFX_ByteString GetPassword() { return m_Password; }
CPDF_Dictionary* GetTrailer() const { return m_pTrailer; }
FX_FILESIZE GetLastXRefOffset() const { return m_LastXRefOffset; }
- CPDF_Document* GetDocument() const { return m_pDocument.get(); }
+ CPDF_Document* GetDocument() const { return m_pDocument; }
uint32_t GetPermissions() const;
uint32_t GetRootObjNum();
@@ -120,7 +117,7 @@ class CPDF_Parser {
// the objects.
bool VerifyCrossRefV4();
- std::unique_ptr<CPDF_Document> m_pDocument;
+ CPDF_Document* m_pDocument; // not owned
std::unique_ptr<CPDF_SyntaxParser> m_pSyntax;
bool m_bOwnFileRead;
int m_FileVersion;
« no previous file with comments | « core/fpdfapi/fpdf_parser/include/cpdf_document.h ('k') | fpdfsdk/fpdf_dataavail.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698