From dabc5d57bf473708295800a7991bc1fafdf76288 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 5 Feb 2015 09:46:23 -0800 Subject: Add namespace and-re-arrange PDFium's local copy of chromium /base. Any projects DEPS'd into chromium and requiring a /base subset should have a local copy of that subset in a separate namespace. This will avoid future naming conflicts. Re-arrange the directory structure to better identify what came from chromium's base, and to make drop-in replacement easier for files that contain hard-coded "base/" in their #include directives. R=jam@chromium.org Review URL: https://codereview.chromium.org/900753002 --- fpdfsdk/src/fpdfview.cpp | 6 +++--- fpdfsdk/src/javascript/Document.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp index b751091a99..401f817be2 100644 --- a/fpdfsdk/src/fpdfview.cpp +++ b/fpdfsdk/src/fpdfview.cpp @@ -11,7 +11,7 @@ #include "../include/fpdf_progressive.h" #include "../include/fpdf_ext.h" #include "../../../core/src/fxcrt/fx_safe_types.h" -#include "../../third_party/numerics/safe_conversions_impl.h" +#include "../../third_party/base/numerics/safe_conversions_impl.h" CPDF_CustomAccess::CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess) { @@ -24,7 +24,7 @@ FX_BOOL CPDF_CustomAccess::ReadBlock(void* buffer, FX_FILESIZE offset, size_t si if (offset < 0) { return FALSE; } - FX_SAFE_FILESIZE newPos = base::checked_cast(size); + FX_SAFE_FILESIZE newPos = pdfium::base::checked_cast(size); newPos += offset; if (!newPos.IsValid() || newPos.ValueOrDie() > m_FileAccess.m_FileLen) { return FALSE; @@ -210,7 +210,7 @@ public: if (offset < 0) { return FALSE; } - FX_SAFE_FILESIZE newPos = base::checked_cast(size); + FX_SAFE_FILESIZE newPos = pdfium::base::checked_cast(size); newPos += offset; if (!newPos.IsValid() || newPos.ValueOrDie() > (FX_DWORD)m_size) { return FALSE; diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp index 96cec474c2..8f7a8f29e3 100644 --- a/fpdfsdk/src/javascript/Document.cpp +++ b/fpdfsdk/src/javascript/Document.cpp @@ -18,7 +18,7 @@ #include "../../include/javascript/Icon.h" #include "../../include/javascript/Field.h" -#include "../../../third_party/numerics/safe_math.h" +#include "../../../third_party/base/numerics/safe_math.h" static v8::Isolate* GetIsolate(IFXJS_Context* cc) { @@ -1428,7 +1428,7 @@ FX_BOOL Document::documentFileName(OBJ_PROP_PARAMS) CFX_WideString Document::ReversalStr(CFX_WideString cbFrom) { size_t iLength = cbFrom.GetLength(); - base::CheckedNumeric iSize = sizeof(wchar_t); + pdfium::base::CheckedNumeric iSize = sizeof(wchar_t); iSize *= (iLength + 1); wchar_t* pResult = (wchar_t*)malloc(iSize.ValueOrDie()); wchar_t* pFrom = (wchar_t*)cbFrom.GetBuffer(iLength); @@ -1449,7 +1449,7 @@ CFX_WideString Document::ReversalStr(CFX_WideString cbFrom) CFX_WideString Document::CutString(CFX_WideString cbFrom) { size_t iLength = cbFrom.GetLength(); - base::CheckedNumeric iSize = sizeof(wchar_t); + pdfium::base::CheckedNumeric iSize = sizeof(wchar_t); iSize *= (iLength + 1); wchar_t* pResult = (wchar_t*)malloc(iSize.ValueOrDie()); wchar_t* pFrom = (wchar_t*)cbFrom.GetBuffer(iLength); -- cgit v1.2.3