summaryrefslogtreecommitdiff
path: root/core/fxcrt/include/fx_safe_types.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-23 15:41:39 -0400
committerDan Sinclair <dsinclair@chromium.org>2016-03-23 15:41:39 -0400
commita8a28e0702a1874d29d3c9f2b155bce1557eb4fd (patch)
tree2b2d412e95004a846c39b9f05b444bbfce05d0a8 /core/fxcrt/include/fx_safe_types.h
parent029ea3ef8e49244e0a6e80d38768764ce27bad30 (diff)
downloadpdfium-a8a28e0702a1874d29d3c9f2b155bce1557eb4fd.tar.xz
Move core/include/fxcrt to core/fxcrt/include.
This CL moves the fxcrt code into the core/fxcrt directory. The only exception was fx_bidi.h which was moved into core/fxcrt as it is not used outside of core/. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1825953002 .
Diffstat (limited to 'core/fxcrt/include/fx_safe_types.h')
-rw-r--r--core/fxcrt/include/fx_safe_types.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/fxcrt/include/fx_safe_types.h b/core/fxcrt/include/fx_safe_types.h
new file mode 100644
index 0000000000..47eb55ddd5
--- /dev/null
+++ b/core/fxcrt/include/fx_safe_types.h
@@ -0,0 +1,20 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CORE_FXCRT_INCLUDE_FX_SAFE_TYPES_H_
+#define CORE_FXCRT_INCLUDE_FX_SAFE_TYPES_H_
+
+#include <stdlib.h> // For size_t.
+
+#include "core/fxcrt/include/fx_stream.h" // for FX_FILESIZE.
+#include "core/fxcrt/include/fx_system.h"
+#include "third_party/base/numerics/safe_math.h"
+
+typedef pdfium::base::CheckedNumeric<FX_DWORD> FX_SAFE_DWORD;
+typedef pdfium::base::CheckedNumeric<int32_t> FX_SAFE_INT32;
+typedef pdfium::base::CheckedNumeric<size_t> FX_SAFE_SIZE_T;
+typedef pdfium::base::CheckedNumeric<FX_FILESIZE> FX_SAFE_FILESIZE;
+typedef pdfium::base::CheckedNumeric<FX_STRSIZE> FX_SAFE_STRSIZE;
+
+#endif // CORE_FXCRT_INCLUDE_FX_SAFE_TYPES_H_