diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-04 19:05:21 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-04 19:05:21 -0700 |
commit | 6675a80c6afe3652b7bd918b80a16a8effb51b8f (patch) | |
tree | 869efaae9312c11bb8f2fb7c707690a3fa468708 /core/include/fxcrt | |
parent | 76510e4127dc938d121ac5026000f3b0d84a2d46 (diff) | |
download | pdfium-6675a80c6afe3652b7bd918b80a16a8effb51b8f.tar.xz |
Merge to XFA: Move fx_safe_types.h to include/ directory.
Original Review URL: https://codereview.chromium.org/1147353006
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1152693005
Diffstat (limited to 'core/include/fxcrt')
-rw-r--r-- | core/include/fxcrt/fx_safe_types.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/include/fxcrt/fx_safe_types.h b/core/include/fxcrt/fx_safe_types.h new file mode 100644 index 0000000000..e45e6d3c8d --- /dev/null +++ b/core/include/fxcrt/fx_safe_types.h @@ -0,0 +1,19 @@ +// 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_INCLUDE_FXCRT_FX_SAFE_TYPES_H_ +#define CORE_INCLUDE_FXCRT_FX_SAFE_TYPES_H_ + +#include <stdlib.h> // For size_t. + +#include "../../../third_party/base/numerics/safe_math.h" +#include "fx_stream.h" // for FX_FILESIZE. +#include "fx_system.h" + +typedef pdfium::base::CheckedNumeric<FX_DWORD> FX_SAFE_DWORD; +typedef pdfium::base::CheckedNumeric<FX_INT32> FX_SAFE_INT32; +typedef pdfium::base::CheckedNumeric<size_t> FX_SAFE_SIZE_T; +typedef pdfium::base::CheckedNumeric<FX_FILESIZE> FX_SAFE_FILESIZE; + +#endif // CORE_INCLUDE_FXCRT_FX_SAFE_TYPES_H_ |