summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfdoc_unittest.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-03 15:24:27 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-03 15:24:27 -0700
commit36eb4bdcae719cf33c536ff72ac000482aed8382 (patch)
treeb3c3467fa10eafc3863a619ef511d1bf20af6367 /fpdfsdk/fpdfdoc_unittest.cpp
parent76383db4906c9357292846ace77566b34eb47de9 (diff)
downloadpdfium-36eb4bdcae719cf33c536ff72ac000482aed8382.tar.xz
Add ptr_util.h from base until std::make_unique<> available
Review-Url: https://codereview.chromium.org/2386273004
Diffstat (limited to 'fpdfsdk/fpdfdoc_unittest.cpp')
-rw-r--r--fpdfsdk/fpdfdoc_unittest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/fpdfdoc_unittest.cpp b/fpdfsdk/fpdfdoc_unittest.cpp
index 70d136b890..e559f60125 100644
--- a/fpdfsdk/fpdfdoc_unittest.cpp
+++ b/fpdfsdk/fpdfdoc_unittest.cpp
@@ -16,6 +16,7 @@
#include "core/fpdfapi/fpdf_parser/cpdf_string.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/test_support.h"
+#include "third_party/base/ptr_util.h"
#ifdef PDF_ENABLE_XFA
#include "fpdfsdk/fpdfxfa/fpdfxfa_app.h"
@@ -34,7 +35,7 @@ class CPDF_TestDocument : public CPDF_Document {
class CPDF_TestXFADocument : public CPDFXFA_Document {
public:
CPDF_TestXFADocument()
- : CPDFXFA_Document(WrapUnique(new CPDF_TestDocument()),
+ : CPDFXFA_Document(pdfium::MakeUnique<CPDF_TestDocument>(),
CPDFXFA_App::GetInstance()) {}
void SetRoot(CPDF_Dictionary* root) {
@@ -61,7 +62,7 @@ class PDFDocTest : public testing::Test {
CPDF_ModuleMgr* module_mgr = CPDF_ModuleMgr::Get();
module_mgr->InitPageModule();
- m_pDoc = WrapUnique(new CPDF_TestPdfDocument());
+ m_pDoc = pdfium::MakeUnique<CPDF_TestPdfDocument>();
m_pIndirectObjs = m_pDoc->GetHolder();
// Setup the root directory.
m_pRootObj.reset(new CPDF_Dictionary());