| Index: pdf/pdfium/pdfium_engine.cc
|
| diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
|
| index b4c07e8478a8fd659955c72aee2a7d47c3d66268..bc13cb79395ec446b72f9348234189a0c9fe40b5 100644
|
| --- a/pdf/pdfium/pdfium_engine.cc
|
| +++ b/pdf/pdfium/pdfium_engine.cc
|
| @@ -876,47 +876,18 @@ void PDFiumEngine::Form_UploadTo(FPDF_FORMFILLINFO* param,
|
|
|
| FPDF_LPFILEHANDLER PDFiumEngine::Form_DownloadFromURL(FPDF_FORMFILLINFO* param,
|
| FPDF_WIDESTRING url) {
|
| - std::string url_str =
|
| - base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(url));
|
| -
|
| - // Now should get data from url.
|
| - // For testing purpose, use data read from file
|
| - // TODO: needs the full implementation here
|
| - FILE* file = fopen(XFA_TESTFILE("downloadtest.tem"), "w");
|
| -
|
| - FPDF_FILE* file_wrapper = new FPDF_FILE;
|
| - file_wrapper->file = file;
|
| - file_wrapper->file_handler.clientData = file_wrapper;
|
| - file_wrapper->file_handler.Flush = Sample_Flush;
|
| - file_wrapper->file_handler.GetSize = Sample_GetSize;
|
| - file_wrapper->file_handler.ReadBlock = Sample_ReadBlock;
|
| - file_wrapper->file_handler.Release = Sample_Release;
|
| - file_wrapper->file_handler.Truncate = Sample_Truncate;
|
| - file_wrapper->file_handler.WriteBlock = Sample_WriteBlock;
|
| -
|
| - return &file_wrapper->file_handler;
|
| + // NOTE: Think hard about the security implications before allowing
|
| + // a PDF file to perform this action.
|
| + return nullptr;
|
| }
|
|
|
| FPDF_FILEHANDLER* PDFiumEngine::Form_OpenFile(FPDF_FORMFILLINFO* param,
|
| int file_flag,
|
| FPDF_WIDESTRING url,
|
| const char* mode) {
|
| - std::string url_str = url ?
|
| - base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(url)) : "NULL";
|
| -
|
| - // TODO: need to implement open file from the url
|
| - // Use a file path for the ease of testing
|
| - FILE* file = fopen(XFA_TESTFILE("tem.txt"), mode);
|
| - FPDF_FILE* file_wrapper = new FPDF_FILE;
|
| - file_wrapper->file = file;
|
| - file_wrapper->file_handler.clientData = file_wrapper;
|
| - file_wrapper->file_handler.Flush = Sample_Flush;
|
| - file_wrapper->file_handler.GetSize = Sample_GetSize;
|
| - file_wrapper->file_handler.ReadBlock = Sample_ReadBlock;
|
| - file_wrapper->file_handler.Release = Sample_Release;
|
| - file_wrapper->file_handler.Truncate = Sample_Truncate;
|
| - file_wrapper->file_handler.WriteBlock = Sample_WriteBlock;
|
| - return &file_wrapper->file_handler;
|
| + // NOTE: Think hard about the security implications before allowing
|
| + // a PDF file to perform this action.
|
| + return nullptr;
|
| }
|
|
|
| void PDFiumEngine::Form_GotoURL(FPDF_FORMFILLINFO* param,
|
|
|