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

Side by Side Diff: core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp

Issue 1861403002: Rename FX_SAFE_DWORD to FX_SAFE_UINT32 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/fpdfapi/fpdf_parser/include/ipdf_data_avail.h" 7 #include "core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h"
8 8
9 #include "core/fpdfapi/fpdf_parser/cpdf_data_avail.h" 9 #include "core/fpdfapi/fpdf_parser/cpdf_data_avail.h"
10 #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" 10 #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h"
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 m_pDocument->LoadPages(); 1500 m_pDocument->LoadPages();
1501 return FALSE; 1501 return FALSE;
1502 } 1502 }
1503 1503
1504 IPDF_DataAvail::DocAvailStatus CPDF_DataAvail::CheckLinearizedData( 1504 IPDF_DataAvail::DocAvailStatus CPDF_DataAvail::CheckLinearizedData(
1505 IPDF_DataAvail::DownloadHints* pHints) { 1505 IPDF_DataAvail::DownloadHints* pHints) {
1506 if (m_bLinearedDataOK) 1506 if (m_bLinearedDataOK)
1507 return DataAvailable; 1507 return DataAvailable;
1508 1508
1509 if (!m_bMainXRefLoadTried) { 1509 if (!m_bMainXRefLoadTried) {
1510 FX_SAFE_DWORD data_size = m_dwFileLen; 1510 FX_SAFE_UINT32 data_size = m_dwFileLen;
1511 data_size -= m_dwLastXRefOffset; 1511 data_size -= m_dwLastXRefOffset;
1512 if (!data_size.IsValid()) 1512 if (!data_size.IsValid())
1513 return DataError; 1513 return DataError;
1514 1514
1515 if (!m_pFileAvail->IsDataAvail(m_dwLastXRefOffset, 1515 if (!m_pFileAvail->IsDataAvail(m_dwLastXRefOffset,
1516 data_size.ValueOrDie())) { 1516 data_size.ValueOrDie())) {
1517 pHints->AddSegment(m_dwLastXRefOffset, data_size.ValueOrDie()); 1517 pHints->AddSegment(m_dwLastXRefOffset, data_size.ValueOrDie());
1518 return DataNotAvailable; 1518 return DataNotAvailable;
1519 } 1519 }
1520 1520
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1835 return FormAvailable; 1835 return FormAvailable;
1836 } 1836 }
1837 1837
1838 CPDF_DataAvail::PageNode::PageNode() : m_type(PDF_PAGENODE_UNKNOWN) {} 1838 CPDF_DataAvail::PageNode::PageNode() : m_type(PDF_PAGENODE_UNKNOWN) {}
1839 1839
1840 CPDF_DataAvail::PageNode::~PageNode() { 1840 CPDF_DataAvail::PageNode::~PageNode() {
1841 for (int32_t i = 0; i < m_childNode.GetSize(); ++i) 1841 for (int32_t i = 0; i < m_childNode.GetSize(); ++i)
1842 delete m_childNode[i]; 1842 delete m_childNode[i];
1843 m_childNode.RemoveAll(); 1843 m_childNode.RemoveAll();
1844 } 1844 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698