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

Issue 7038032: Fix PP_FileOpenFlags_Dev handling: (Closed)

Created:
9 years, 7 months ago by yzshen1
Modified:
9 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, pam+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86349

Patch Set 1 #

Total comments: 4

Patch Set 2 : Sync and more clear comments in platform_file.h #

Patch Set 3 : Rename PLATFORM_FILE_TRUNCATE to PLATFORM_FILE_OPEN_TRUNCATED #

Total comments: 4

Patch Set 4 : Make changes according to Darin's suggestions. #

Total comments: 6

Patch Set 5 : Make changes according to Darin's suggestions. #

Patch Set 6 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+383 lines, -176 lines) Patch
M base/platform_file.h View 1 2 3 4 1 chunk +19 lines, -13 lines 0 comments Download
M base/platform_file_posix.cc View 1 2 2 chunks +6 lines, -5 lines 0 comments Download
M base/platform_file_win.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_file_browser_private_api.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/child_process_security_policy_unittest.cc View 1 2 2 chunks +6 lines, -6 lines 0 comments Download
M content/browser/renderer_host/browser_render_process_host.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/pepper_file_message_filter.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/worker_host/worker_process_host.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ppapi/tests/test_file_io.h View 1 2 3 4 5 2 chunks +28 lines, -0 lines 0 comments Download
M ppapi/tests/test_file_io.cc View 1 2 3 4 5 5 chunks +203 lines, -17 lines 0 comments Download
M ppapi/tests/test_file_ref.cc View 1 chunk +3 lines, -1 line 0 comments Download
M webkit/fileapi/file_system_operation.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M webkit/glue/webkit_glue.gypi View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
D webkit/plugins/ppapi/error_util.h View 1 chunk +0 lines, -18 lines 0 comments Download
D webkit/plugins/ppapi/error_util.cc View 1 chunk +0 lines, -36 lines 0 comments Download
M webkit/plugins/ppapi/file_callbacks.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A webkit/plugins/ppapi/file_type_conversions.h View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download
A webkit/plugins/ppapi/file_type_conversions.cc View 1 2 3 1 chunk +77 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_file_io_impl.cc View 1 2 3 3 chunks +3 lines, -39 lines 0 comments Download
M webkit/plugins/ppapi/ppb_flash_file_impl.cc View 1 2 3 4 chunks +3 lines, -31 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
darin (slow to review)
http://codereview.chromium.org/7038032/diff/1/base/platform_file_posix.cc File base/platform_file_posix.cc (right): http://codereview.chromium.org/7038032/diff/1/base/platform_file_posix.cc#newcode48 base/platform_file_posix.cc:48: DCHECK(!open_flags); so this means that it is not possible ...
9 years, 7 months ago (2011-05-20 21:02:13 UTC) #1
yzshen1
Hi, Darin. Thanks for your reply. Please see my comments. http://codereview.chromium.org/7038032/diff/1/base/platform_file_posix.cc File base/platform_file_posix.cc (right): http://codereview.chromium.org/7038032/diff/1/base/platform_file_posix.cc#newcode48 ...
9 years, 7 months ago (2011-05-20 21:29:24 UTC) #2
yzshen
One more note: Currently, PlatformFileFlags looks like Windows file open flags; while PP_FileOpenFlags_Dev looks like ...
9 years, 7 months ago (2011-05-20 21:35:41 UTC) #3
darin (slow to review)
OK, makes sense. Thanks! On Fri, May 20, 2011 at 2:35 PM, Yuzhu Shen <yzshen@google.com> ...
9 years, 7 months ago (2011-05-20 22:12:13 UTC) #4
darin (slow to review)
Actually, when I read platform_file.h, it is really not obvious that these five flags are ...
9 years, 7 months ago (2011-05-20 22:26:19 UTC) #5
yzshen
Hi, Darin. On Fri, May 20, 2011 at 3:26 PM, Darin Fisher <darin@chromium.org> wrote: > ...
9 years, 7 months ago (2011-05-20 22:43:12 UTC) #6
yzshen1
Hi, Darin. I have added more comments in platform_file.h. Please let me know whether that ...
9 years, 7 months ago (2011-05-20 23:08:41 UTC) #7
darin (slow to review)
On Fri, May 20, 2011 at 3:43 PM, Yuzhu Shen <yzshen@google.com> wrote: > Hi, Darin. ...
9 years, 7 months ago (2011-05-20 23:24:35 UTC) #8
yzshen
Hi, Darin. On Fri, May 20, 2011 at 4:24 PM, Darin Fisher <darin@chromium.org> wrote: > ...
9 years, 7 months ago (2011-05-20 23:28:42 UTC) #9
darin (slow to review)
On Fri, May 20, 2011 at 4:28 PM, Yuzhu Shen <yzshen@google.com> wrote: > Hi, Darin. ...
9 years, 7 months ago (2011-05-20 23:29:42 UTC) #10
yzshen1
Hi, Darin. I have updated the CL. Please take another look. Thank you! On Fri, ...
9 years, 7 months ago (2011-05-21 02:20:05 UTC) #11
darin (slow to review)
Looks great. Just some nits. http://codereview.chromium.org/7038032/diff/2004/ppapi/tests/test_file_io.cc File ppapi/tests/test_file_io.cc (right): http://codereview.chromium.org/7038032/diff/2004/ppapi/tests/test_file_io.cc#newcode136 ppapi/tests/test_file_io.cc:136: false, // invalid_combination instead ...
9 years, 7 months ago (2011-05-21 04:32:25 UTC) #12
yzshen1
Hi, Darin. Thanks for your suggestions! Please take another look. http://codereview.chromium.org/7038032/diff/2004/ppapi/tests/test_file_io.cc File ppapi/tests/test_file_io.cc (right): http://codereview.chromium.org/7038032/diff/2004/ppapi/tests/test_file_io.cc#newcode136 ...
9 years, 7 months ago (2011-05-23 00:53:01 UTC) #13
darin (slow to review)
LGTM http://codereview.chromium.org/7038032/diff/8001/base/platform_file.h File base/platform_file.h (right): http://codereview.chromium.org/7038032/diff/8001/base/platform_file.h#newcode32 base/platform_file.h:32: // exactly one of the five (possibly combining ...
9 years, 7 months ago (2011-05-23 18:17:42 UTC) #14
yzshen1
http://codereview.chromium.org/7038032/diff/8001/base/platform_file.h File base/platform_file.h (right): http://codereview.chromium.org/7038032/diff/8001/base/platform_file.h#newcode32 base/platform_file.h:32: // exactly one of the five (possibly combining with ...
9 years, 7 months ago (2011-05-23 19:48:06 UTC) #15
darin (slow to review)
On Mon, May 23, 2011 at 12:48 PM, <yzshen@chromium.org> wrote: > > http://codereview.chromium.org/7038032/diff/8001/base/platform_file.h > File ...
9 years, 7 months ago (2011-05-23 21:20:39 UTC) #16
darin (slow to review)
9 years, 7 months ago (2011-05-23 21:23:00 UTC) #17
LGTM

Powered by Google App Engine
This is Rietveld 408576698