summaryrefslogtreecommitdiffstats
path: root/base/platform_file_win.cc
diff options
context:
space:
mode:
authoryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-23 22:00:04 +0000
committeryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-23 22:00:04 +0000
commitb2f2308d0c635418caa3ad2a2560a2778d70a4d5 (patch)
treedaaa5177eb28ddcb2d5582a4e78cf7b0318aea07 /base/platform_file_win.cc
parent10b6e62953ff6ebc0ac9e7cb7628677da273f79b (diff)
downloadchromium_src-b2f2308d0c635418caa3ad2a2560a2778d70a4d5.zip
chromium_src-b2f2308d0c635418caa3ad2a2560a2778d70a4d5.tar.gz
chromium_src-b2f2308d0c635418caa3ad2a2560a2778d70a4d5.tar.bz2
Fix PP_FileOpenFlags_Dev handling:
- rewrite the mapping from PP_FileOpenFlags_Dev to PlatformFileFlags. - let ppb_flash_file_impl and ppb_file_io_impl use the same mapping logic. - CreatePlatformFile: resolve the conflict between the win and posix implementation. Before this change, the win implementation didn't allow PLATFORM_FILE_TRUNCATE to be used with any of the (OPEN|CREATE)(_ALWAYS)? flags; while the posix implementation required it to be used with them. - add more test cases to test the behavior of different PP_FileOpenFlags_Dev combinations. - also unify the conversion from PlatformFileError to Pepper error. BUG=68489 TEST=New test cases in test_file_io.cc Review URL: http://codereview.chromium.org/7038032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86349 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/platform_file_win.cc')
-rw-r--r--base/platform_file_win.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/platform_file_win.cc b/base/platform_file_win.cc
index 7a6a586..f448db0 100644
--- a/base/platform_file_win.cc
+++ b/base/platform_file_win.cc
@@ -38,7 +38,7 @@ PlatformFile CreatePlatformFile(const FilePath& name,
disposition = CREATE_ALWAYS;
}
- if (flags & PLATFORM_FILE_TRUNCATE) {
+ if (flags & PLATFORM_FILE_OPEN_TRUNCATED) {
DCHECK(!disposition);
DCHECK(flags & PLATFORM_FILE_WRITE);
disposition = TRUNCATE_EXISTING;