Only support seeking file streams from the beginning of the file.
On Windows file streams are backed by files opened for overlapped I/O.
In this mode SetFilePointerEx (used for seeking) will return a write-
protected media error if the file is on write-protected media. This is
even if the file is opened read-only! Since no code (except for the
FileStream tests) calls Seek with anything other than File::FROM_BEGIN
it is simplest to simply remove this capability. That way we can update
the offset in the FileStream context's overlapped structure without
going through a call to Windows.
BUG=478227
Review URL: https://codereview.chromium.org/1148383003
Cr-Commit-Position: refs/heads/master@{#334518}
CrOS-Libchrome-Original-Commit: aa435e70c70364430093361b5b8c460831f80bb4
2 files changed