summaryrefslogtreecommitdiffstats
path: root/net/base/file_stream.h
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 22:26:41 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 22:26:41 +0000
commit92aad5227a8e7b00f7fbc3e409037bf23cccda0c (patch)
tree13ec2aa09ed2e376a6c78524c3489f24d8e2d9a4 /net/base/file_stream.h
parentaf416dfd64790147f1b25c634b4054907e54ba12 (diff)
downloadchromium_src-92aad5227a8e7b00f7fbc3e409037bf23cccda0c.zip
chromium_src-92aad5227a8e7b00f7fbc3e409037bf23cccda0c.tar.gz
chromium_src-92aad5227a8e7b00f7fbc3e409037bf23cccda0c.tar.bz2
Add constructor to net::FileStream to create it with a base::PlatformFile handle.
Constructor added to both _win and _posix implementations and provided a unit test. Review URL: http://codereview.chromium.org/20137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9428 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/file_stream.h')
-rw-r--r--net/base/file_stream.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/base/file_stream.h b/net/base/file_stream.h
index 67f93ed..20466b4 100644
--- a/net/base/file_stream.h
+++ b/net/base/file_stream.h
@@ -27,6 +27,13 @@ enum Whence {
class FileStream {
public:
FileStream();
+
+ // Construct a FileStream with an existing file handle and opening flags.
+ // |file| is valid file handle.
+ // |flags| is a bitfield of base::PlatformFileFlags when the file handle was
+ // opened.
+ FileStream(base::PlatformFile file, int flags);
+
~FileStream();
// Call this method to close the FileStream. It is OK to call Close