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

Side by Side Diff: fpdfsdk/src/fpdfview.cpp

Issue 1412793003: Merge to XFA: Sanity check the values of TRUE and FALSE. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « core/src/fxge/win32/fx_win32_dwrite.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « core/src/fxge/win32/fx_win32_dwrite.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698