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

Side by Side Diff: xfa/fxfa/app/xfa_checksum.cpp

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix CPDF_Name::GetConstString() 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
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp ('k') | xfa/fxfa/app/xfa_fftextedit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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 "xfa/include/fxfa/xfa_checksum.h" 7 #include "xfa/include/fxfa/xfa_checksum.h"
8 8
9 #include "core/fdrm/crypto/include/fx_crypt.h" 9 #include "core/fdrm/crypto/include/fx_crypt.h"
10 #include "xfa/fgas/crt/fgas_algorithm.h" 10 #include "xfa/fgas/crt/fgas_algorithm.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 void CXFA_SAXReaderHandler::OnTagClose(void* pTag, uint32_t dwEndPos) { 67 void CXFA_SAXReaderHandler::OnTagClose(void* pTag, uint32_t dwEndPos) {
68 if (pTag == NULL) { 68 if (pTag == NULL) {
69 return; 69 return;
70 } 70 }
71 CXFA_SAXContext* pSAXContext = (CXFA_SAXContext*)pTag; 71 CXFA_SAXContext* pSAXContext = (CXFA_SAXContext*)pTag;
72 CFX_ByteTextBuf& textBuf = pSAXContext->m_TextBuf; 72 CFX_ByteTextBuf& textBuf = pSAXContext->m_TextBuf;
73 if (pSAXContext->m_eNode == FX_SAXNODE_Instruction) { 73 if (pSAXContext->m_eNode == FX_SAXNODE_Instruction) {
74 textBuf << "?>"; 74 textBuf << "?>";
75 } else if (pSAXContext->m_eNode == FX_SAXNODE_Tag) { 75 } else if (pSAXContext->m_eNode == FX_SAXNODE_Tag) {
76 textBuf << "></" << pSAXContext->m_bsTagName << ">"; 76 textBuf << "></" << pSAXContext->m_bsTagName.AsByteStringC() << ">";
77 } 77 }
78 UpdateChecksum(FALSE); 78 UpdateChecksum(FALSE);
79 } 79 }
80 void CXFA_SAXReaderHandler::OnTagEnd(void* pTag, 80 void CXFA_SAXReaderHandler::OnTagEnd(void* pTag,
81 const CFX_ByteStringC& bsTagName, 81 const CFX_ByteStringC& bsTagName,
82 uint32_t dwEndPos) { 82 uint32_t dwEndPos) {
83 if (pTag == NULL) { 83 if (pTag == NULL) {
84 return; 84 return;
85 } 85 }
86 CFX_ByteTextBuf& textBuf = ((CXFA_SAXContext*)pTag)->m_TextBuf; 86 CFX_ByteTextBuf& textBuf = ((CXFA_SAXContext*)pTag)->m_TextBuf;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 } 180 }
181 void CXFA_ChecksumContext::GetChecksum(CFX_ByteString& bsChecksum) { 181 void CXFA_ChecksumContext::GetChecksum(CFX_ByteString& bsChecksum) {
182 bsChecksum = m_bsChecksum; 182 bsChecksum = m_bsChecksum;
183 } 183 }
184 void CXFA_ChecksumContext::Update(const CFX_ByteStringC& bsText) { 184 void CXFA_ChecksumContext::Update(const CFX_ByteStringC& bsText) {
185 if (m_pByteContext) { 185 if (m_pByteContext) {
186 CRYPT_SHA1Update(m_pByteContext, bsText.GetPtr(), bsText.GetLength()); 186 CRYPT_SHA1Update(m_pByteContext, bsText.GetPtr(), bsText.GetLength());
187 } 187 }
188 } 188 }
OLDNEW
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp ('k') | xfa/fxfa/app/xfa_fftextedit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698