| OLD | NEW | 
|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "../../core/include/fpdfapi/fpdf_module.h" | 7 #include "../../core/include/fpdfapi/fpdf_module.h" | 
| 8 #include "../../core/include/fxcodec/fx_codec.h" | 8 #include "../../core/include/fxcodec/fx_codec.h" | 
| 9 #include "../../core/include/fxcrt/fx_safe_types.h" | 9 #include "../../core/include/fxcrt/fx_safe_types.h" | 
| 10 #include "../../public/fpdf_ext.h" | 10 #include "../../public/fpdf_ext.h" | 
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 168         foxit_sandbox_policy &= 0xFFFFFFFE; | 168         foxit_sandbox_policy &= 0xFFFFFFFE; | 
| 169     } break; | 169     } break; | 
| 170     default: | 170     default: | 
| 171       break; | 171       break; | 
| 172   } | 172   } | 
| 173 } | 173 } | 
| 174 | 174 | 
| 175 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy) { | 175 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy) { | 
| 176   switch (policy) { | 176   switch (policy) { | 
| 177     case FPDF_POLICY_MACHINETIME_ACCESS: | 177     case FPDF_POLICY_MACHINETIME_ACCESS: | 
| 178       return (foxit_sandbox_policy & 0x01) ? TRUE : FALSE; | 178       return !!(foxit_sandbox_policy & 0x01); | 
| 179     default: | 179     default: | 
| 180       return FALSE; | 180       return FALSE; | 
| 181   } | 181   } | 
| 182 } | 182 } | 
| 183 | 183 | 
| 184 CCodec_ModuleMgr* g_pCodecModule = nullptr; | 184 CCodec_ModuleMgr* g_pCodecModule = nullptr; | 
| 185 | 185 | 
| 186 DLLEXPORT void STDCALL FPDF_InitLibrary() { | 186 DLLEXPORT void STDCALL FPDF_InitLibrary() { | 
| 187   FPDF_InitLibraryWithConfig(nullptr); | 187   FPDF_InitLibraryWithConfig(nullptr); | 
| 188 } | 188 } | 
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1065   if (!buffer) { | 1065   if (!buffer) { | 
| 1066     *buflen = len; | 1066     *buflen = len; | 
| 1067   } else if (*buflen >= len) { | 1067   } else if (*buflen >= len) { | 
| 1068     memcpy(buffer, utf16Name.c_str(), len); | 1068     memcpy(buffer, utf16Name.c_str(), len); | 
| 1069     *buflen = len; | 1069     *buflen = len; | 
| 1070   } else { | 1070   } else { | 
| 1071     *buflen = -1; | 1071     *buflen = -1; | 
| 1072   } | 1072   } | 
| 1073   return (FPDF_DEST)pDestObj; | 1073   return (FPDF_DEST)pDestObj; | 
| 1074 } | 1074 } | 
| OLD | NEW | 
|---|