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

Unified Diff: net/base/file_stream_context.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 | « net/base/file_stream.cc ('k') | net/base/file_stream_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream_context.h
diff --git a/net/base/file_stream_context.h b/net/base/file_stream_context.h
index 00b90e630f95d0d0ea85695451b4fbd28c36ec18..c1846c460d354a58b98d45b3d8694d5edf7f8651 100644
--- a/net/base/file_stream_context.h
+++ b/net/base/file_stream_context.h
@@ -75,7 +75,6 @@ class FileStream::Context {
int buf_len,
const CompletionCallback& callback);
- const base::File& file() const { return file_; }
bool async_in_progress() const { return async_in_progress_; }
////////////////////////////////////////////////////////////////////////////
@@ -93,12 +92,13 @@ class FileStream::Context {
void Close(const CompletionCallback& callback);
- void Seek(base::File::Whence whence,
- int64_t offset,
- const Int64CompletionCallback& callback);
+ // Seeks |offset| bytes from the start of the file.
+ void Seek(int64_t offset, const Int64CompletionCallback& callback);
void Flush(const CompletionCallback& callback);
+ bool IsOpen() const;
+
private:
struct IOResult {
IOResult();
@@ -150,7 +150,7 @@ class FileStream::Context {
////////////////////////////////////////////////////////////////////////////
// Adjusts the position from where the data is read.
- IOResult SeekFileImpl(base::File::Whence whence, int64_t offset);
+ IOResult SeekFileImpl(int64_t offset);
void OnFileOpened();
« no previous file with comments | « net/base/file_stream.cc ('k') | net/base/file_stream_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698