Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1036)

Unified Diff: net/base/file_stream.h

Issue 1148383003: Only support seeking file streams from the beginning of the file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more instance where files need to be tagged as async. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/file_stream.h
diff --git a/net/base/file_stream.h b/net/base/file_stream.h
index 89db65e15b5ae49e50de78874e64c3babf7df640..d22c7cf182d3d51ece9e1d50e1dcccc9af3729a0 100644
--- a/net/base/file_stream.h
+++ b/net/base/file_stream.h
@@ -62,14 +62,13 @@ class NET_EXPORT FileStream {
// Returns true if Open succeeded and Close has not been called.
virtual bool IsOpen() const;
- // Adjust the position from where data is read asynchronously.
- // Upon success, ERR_IO_PENDING is returned and |callback| will be run
- // on the thread where Seek() was called with the the stream position
- // relative to the start of the file. Otherwise, an error code is returned.
- // It is invalid to request any asynchronous operations while there is an
- // in-flight asynchronous operation.
- virtual int Seek(base::File::Whence whence, int64 offset,
- const Int64CompletionCallback& callback);
+ // Adjust the position from the start of the file where data is read
+ // asynchronously. Upon success, ERR_IO_PENDING is returned and |callback|
+ // will be run on the thread where Seek() was called with the the stream
+ // position relative to the start of the file. Otherwise, an error code is
+ // returned. It is invalid to request any asynchronous operations while there
+ // is an in-flight asynchronous operation.
+ virtual int Seek(int64 offset, const Int64CompletionCallback& callback);
// Call this method to read data from the current stream position
// asynchronously. Up to buf_len bytes will be copied into buf. (In
@@ -140,9 +139,6 @@ class NET_EXPORT FileStream {
// This method should not be called if the stream was opened READ_ONLY.
virtual int Flush(const CompletionCallback& callback);
- // Returns the underlying file for testing.
- const base::File& GetFileForTesting() const;
-
private:
class Context;

Powered by Google App Engine
This is Rietveld 408576698