summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-08-05 10:39:02 -0700
committerTom Sepez <tsepez@chromium.org>2015-08-05 10:39:02 -0700
commit2b9178181eb82a3611bee5c9435ea5956def24be (patch)
treefe7909a1b5338a328f9e53ec1501e72c675da1e7 /core
parent5cd398545141226f082b2f757f23c73303058a83 (diff)
downloadpdfium-2b9178181eb82a3611bee5c9435ea5956def24be.tar.xz
CPDF_Parser shouldnt be in the business of opening files
Move that operation closer to the embedder's call. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1269073003 .
Diffstat (limited to 'core')
-rw-r--r--core/include/fpdfapi/fpdf_parser.h2
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp14
2 files changed, 0 insertions, 16 deletions
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index f80bb24a87..7640c857fa 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -355,8 +355,6 @@ class CPDF_Parser {
CPDF_Parser();
~CPDF_Parser();
- FX_DWORD StartParse(const FX_CHAR* filename, FX_BOOL bReParse = FALSE);
- FX_DWORD StartParse(const FX_WCHAR* filename, FX_BOOL bReParse = FALSE);
FX_DWORD StartParse(IFX_FileRead* pFile,
FX_BOOL bReParse = FALSE,
FX_BOOL bOwnFileRead = TRUE);
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index d0d449308d..e9c07e2864 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -116,20 +116,6 @@ static int32_t GetHeaderOffset(IFX_FileRead* pFile) {
}
return -1;
}
-FX_DWORD CPDF_Parser::StartParse(const FX_CHAR* filename, FX_BOOL bReParse) {
- IFX_FileRead* pFileAccess = FX_CreateFileRead(filename);
- if (!pFileAccess) {
- return PDFPARSE_ERROR_FILE;
- }
- return StartParse(pFileAccess, bReParse);
-}
-FX_DWORD CPDF_Parser::StartParse(const FX_WCHAR* filename, FX_BOOL bReParse) {
- IFX_FileRead* pFileAccess = FX_CreateFileRead(filename);
- if (!pFileAccess) {
- return PDFPARSE_ERROR_FILE;
- }
- return StartParse(pFileAccess, bReParse);
-}
CPDF_SecurityHandler* FPDF_CreateStandardSecurityHandler();
CPDF_SecurityHandler* FPDF_CreatePubKeyHandler(void*);
FX_DWORD CPDF_Parser::StartParse(IFX_FileRead* pFileAccess,