summaryrefslogtreecommitdiffstats
path: root/net/base/file_stream.h
diff options
context:
space:
mode:
authordhg@chromium.org <dhg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 22:36:38 +0000
committerdhg@chromium.org <dhg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 22:36:38 +0000
commitb2a3a25224f1e0cbc9ab77ea8b5f098d494c6c18 (patch)
tree6a085883d6c9c048efa1f72b9189bc3a6b4498ce /net/base/file_stream.h
parent4fbaaee2b26f3edb0fc68a9b330f70e09d1f749d (diff)
downloadchromium_src-b2a3a25224f1e0cbc9ab77ea8b5f098d494c6c18.zip
chromium_src-b2a3a25224f1e0cbc9ab77ea8b5f098d494c6c18.tar.gz
chromium_src-b2a3a25224f1e0cbc9ab77ea8b5f098d494c6c18.tar.bz2
Adding flushing of files on chromeos, so that when something is downloaded, its written out ot disk shortly after finish downloading.
BUG=chromium-os:2661 TEST=none Review URL: http://codereview.chromium.org/2770002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49461 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/file_stream.h')
-rw-r--r--net/base/file_stream.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/base/file_stream.h b/net/base/file_stream.h
index ff9e7a6..a6d5739 100644
--- a/net/base/file_stream.h
+++ b/net/base/file_stream.h
@@ -120,6 +120,15 @@ class FileStream {
// platform with this call.
int64 Truncate(int64 bytes);
+ // Forces out a filesystem sync on this file to make sure that the file was
+ // written out to disk and is not currently sitting in the buffer. This does
+ // not have to be called, it just forces one to happen at the time of
+ // calling.
+ //
+ /// Returns an error code if the operation could not be performed.
+ //
+ // This method should not be called if the stream was opened READ_ONLY.
+ int Flush();
private:
class AsyncContext;
friend class AsyncContext;