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

Side by Side Diff: testing/embedder_test.cpp

Issue 2581873002: Relax the EncryptMetadata check. (Closed)
Patch Set: Fix comments Created 4 years 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
OLDNEW
1 // Copyright 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 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 #include "testing/embedder_test.h" 5 #include "testing/embedder_test.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 nRet = FPDFAvail_IsPageAvail(avail_, i, &hints_); 178 nRet = FPDFAvail_IsPageAvail(avail_, i, &hints_);
179 } 179 }
180 if (nRet == PDF_DATA_ERROR) { 180 if (nRet == PDF_DATA_ERROR) {
181 return false; 181 return false;
182 } 182 }
183 } 183 }
184 } else { 184 } else {
185 if (must_linearize) { 185 if (must_linearize) {
186 return false; 186 return false;
187 } 187 }
188 document_ = FPDF_LoadCustomDocument(&file_access_, nullptr); 188 document_ = FPDF_LoadCustomDocument(&file_access_, password);
189 if (!document_) { 189 if (!document_) {
190 return false; 190 return false;
191 } 191 }
192 } 192 }
193 193
194 #ifdef PDF_ENABLE_XFA 194 #ifdef PDF_ENABLE_XFA
195 int docType = DOCTYPE_PDF; 195 int docType = DOCTYPE_PDF;
196 if (FPDF_HasXFAField(document_, &docType)) { 196 if (FPDF_HasXFAField(document_, &docType)) {
197 if (docType != DOCTYPE_PDF) 197 if (docType != DOCTYPE_PDF)
198 (void)FPDF_LoadXFA(document_); 198 (void)FPDF_LoadXFA(document_);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 367 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
368 if (g_v8_natives) 368 if (g_v8_natives)
369 free(const_cast<char*>(g_v8_natives->data)); 369 free(const_cast<char*>(g_v8_natives->data));
370 if (g_v8_snapshot) 370 if (g_v8_snapshot)
371 free(const_cast<char*>(g_v8_snapshot->data)); 371 free(const_cast<char*>(g_v8_snapshot->data));
372 #endif // V8_USE_EXTERNAL_STARTUP_DATA 372 #endif // V8_USE_EXTERNAL_STARTUP_DATA
373 #endif // PDF_ENABLE_V8 373 #endif // PDF_ENABLE_V8
374 374
375 return ret_val; 375 return ret_val;
376 } 376 }
OLDNEW
« no previous file with comments | « core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp ('k') | testing/resources/bug_644.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698