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

Side by Side Diff: core/fxcrt/fxcrt_platforms.cpp

Issue 1857713003: Rename GetCStr and GetPtr to match CFX_ByteString (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 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 "core/fxcrt/fxcrt_platforms.h" 7 #include "core/fxcrt/fxcrt_platforms.h"
8 8
9 #include "core/fxcrt/include/fx_basic.h" 9 #include "core/fxcrt/include/fx_basic.h"
10 10
(...skipping 26 matching lines...) Expand all
37 CFXCRT_FileAccess_CRT::~CFXCRT_FileAccess_CRT() { 37 CFXCRT_FileAccess_CRT::~CFXCRT_FileAccess_CRT() {
38 Close(); 38 Close();
39 } 39 }
40 FX_BOOL CFXCRT_FileAccess_CRT::Open(const CFX_ByteStringC& fileName, 40 FX_BOOL CFXCRT_FileAccess_CRT::Open(const CFX_ByteStringC& fileName,
41 uint32_t dwMode) { 41 uint32_t dwMode) {
42 if (m_hFile) { 42 if (m_hFile) {
43 return FALSE; 43 return FALSE;
44 } 44 }
45 CFX_ByteString strMode; 45 CFX_ByteString strMode;
46 FXCRT_GetFileModeString(dwMode, strMode); 46 FXCRT_GetFileModeString(dwMode, strMode);
47 m_hFile = FXSYS_fopen(fileName.GetCStr(), strMode.c_str()); 47 m_hFile = FXSYS_fopen(fileName.c_str(), strMode.c_str());
48 return m_hFile != NULL; 48 return m_hFile != NULL;
49 } 49 }
50 FX_BOOL CFXCRT_FileAccess_CRT::Open(const CFX_WideStringC& fileName, 50 FX_BOOL CFXCRT_FileAccess_CRT::Open(const CFX_WideStringC& fileName,
51 uint32_t dwMode) { 51 uint32_t dwMode) {
52 if (m_hFile) { 52 if (m_hFile) {
53 return FALSE; 53 return FALSE;
54 } 54 }
55 CFX_WideString strMode; 55 CFX_WideString strMode;
56 FXCRT_GetFileModeString(dwMode, strMode); 56 FXCRT_GetFileModeString(dwMode, strMode);
57 m_hFile = FXSYS_wfopen(fileName.GetPtr(), strMode.c_str()); 57 m_hFile = FXSYS_wfopen(fileName.GetPtr(), strMode.c_str());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 FX_BOOL CFXCRT_FileAccess_CRT::Flush() { 123 FX_BOOL CFXCRT_FileAccess_CRT::Flush() {
124 if (!m_hFile) { 124 if (!m_hFile) {
125 return FALSE; 125 return FALSE;
126 } 126 }
127 return !FXSYS_fflush(m_hFile); 127 return !FXSYS_fflush(m_hFile);
128 } 128 }
129 FX_BOOL CFXCRT_FileAccess_CRT::Truncate(FX_FILESIZE szFile) { 129 FX_BOOL CFXCRT_FileAccess_CRT::Truncate(FX_FILESIZE szFile) {
130 return FALSE; 130 return FALSE;
131 } 131 }
132 #endif 132 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698