summaryrefslogtreecommitdiffstats
path: root/net/base/file_input_stream.h
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-06 10:17:31 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-06 10:17:31 +0000
commit095214d9fd4f7dc5b9218d3fe78cf3ee08f480b8 (patch)
tree15e796824bac8c4825cf03ea9e179c3db59209fb /net/base/file_input_stream.h
parentcdd6c77f03f43b3531ae504d4c067b235d786ff4 (diff)
downloadchromium_src-095214d9fd4f7dc5b9218d3fe78cf3ee08f480b8.zip
chromium_src-095214d9fd4f7dc5b9218d3fe78cf3ee08f480b8.tar.gz
chromium_src-095214d9fd4f7dc5b9218d3fe78cf3ee08f480b8.tar.bz2
Add Posix sync only support to FileInputStream.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/file_input_stream.h')
-rw-r--r--net/base/file_input_stream.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/base/file_input_stream.h b/net/base/file_input_stream.h
index efebadc..eb4b2ae 100644
--- a/net/base/file_input_stream.h
+++ b/net/base/file_input_stream.h
@@ -17,10 +17,11 @@ typedef void* HANDLE;
namespace net {
// TODO(darin): Move this to a more generic location.
+// This explicit mapping matches both FILE_ on Windows and SEEK_ on Linux.
enum Whence {
- FROM_BEGIN,
- FROM_CURRENT,
- FROM_END
+ FROM_BEGIN = 0,
+ FROM_CURRENT = 1,
+ FROM_END = 2
};
class FileInputStream {
@@ -35,10 +36,7 @@ class FileInputStream {
// Call this method to open the FileInputStream. The remaining methods
// cannot be used unless this method returns OK. If the file cannot be
// opened then an error code is returned.
- //
- // NOTE: The file input stream is opened with non-exclusive access to the
- // underlying file.
- //
+ // NOTE: The underlying file is opened with non-exclusive access.
int Open(const std::wstring& path, bool asynchronous_mode);
// Returns true if Open succeeded and Close has not been called.
@@ -82,6 +80,8 @@ class FileInputStream {
#if defined(OS_WIN)
HANDLE handle_;
+#elif defined(OS_POSIX)
+ int fd_;
#endif
DISALLOW_COPY_AND_ASSIGN(FileInputStream);