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

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: Fix Win DBG build by Pass()-ing file out of CreateForAsyncHandle. Created 5 years, 6 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
« no previous file with comments | « content/browser/android/url_request_content_job.cc ('k') | net/base/file_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream.h
diff --git a/net/base/file_stream.h b/net/base/file_stream.h
index 1524da529716bcd5edf21f436a2ddec076c8b8f3..f0408e45b4a530fe3ec17c62b106b75f5af9b0ed 100644
--- a/net/base/file_stream.h
+++ b/net/base/file_stream.h
@@ -62,15 +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_t 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_t 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
@@ -141,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;
« no previous file with comments | « content/browser/android/url_request_content_job.cc ('k') | net/base/file_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698