DescriptionRename "CheckWritable" to "PrepareForWritableApp" to reflect the actual behavior.
The existing implementation in fact does not check whether the file is
writable or not (see below for the detail.)
Since the current behavior itself is fine for the use cases,
this CL renames the relevant functions, and refactors the implementation
so that the intent is clearer.
Existing implementation tries to open a file with CREATE|READ|WRITE flags
and verifies that the result is either FILE_OK or ALREADY_EXISTS.
This _succeeds_ when read-only file already existed at the location
because ALREADY_EXISTS error precedes write failure.
Considering the fact, it is essentially equivalent to open with OPEN_ALWAYS|READ
and comparing the result just against FILE_OK.
BUG=367028
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274485
Patch Set 1 : #
Total comments: 4
Patch Set 2 : Addressed review comments. #
Messages
Total messages: 7 (0 generated)
|