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

Unified Diff: fpdfsdk/src/javascript/JS_GlobalData.cpp

Issue 1108903002: Merge to XFA: Reduce usage of operator LPCWSTR from CFX_WideString(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/javascript/JS_Context.cpp ('k') | fpdfsdk/src/javascript/JS_Value.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/JS_GlobalData.cpp
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp
index 22077268900ad14392e8c9624fa7a2d552f3c517..b242ae8031167abd7203c9a0f50fc4a41d3af610 100644
--- a/fpdfsdk/src/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp
@@ -353,8 +353,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables()
FX_LPBYTE pBuffer = NULL;
FX_INT32 nLength = 0;
- LoadFileBuffer(m_sFilePath, pBuffer, nLength);
-
+ LoadFileBuffer(m_sFilePath.c_str(), pBuffer, nLength);
CRYPT_ArcFourCryptBlock(pBuffer, nLength, JS_RC4KEY, sizeof(JS_RC4KEY));
if (pBuffer)
@@ -509,7 +508,7 @@ void CJS_GlobalData::SaveGlobalPersisitentVariables()
sFile.AppendBlock(sData.GetBuffer(), sData.GetSize());
CRYPT_ArcFourCryptBlock(sFile.GetBuffer(), sFile.GetSize(), JS_RC4KEY, sizeof(JS_RC4KEY));
- WriteFileBuffer(m_sFilePath, (FX_LPCSTR)sFile.GetBuffer(), sFile.GetSize());
+ WriteFileBuffer(m_sFilePath.c_str(), (FX_LPCSTR)sFile.GetBuffer(), sFile.GetSize());
}
void CJS_GlobalData::LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, FX_INT32& nLength)
« no previous file with comments | « fpdfsdk/src/javascript/JS_Context.cpp ('k') | fpdfsdk/src/javascript/JS_Value.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698