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

Unified Diff: net/base/file_stream.cc

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.cc
diff --git a/net/base/file_stream.cc b/net/base/file_stream.cc
index a97d50b7886376bf6d37974d12d97c66c03db204..84f18592beeeacbde2d06e849da23b8a20c7a176 100644
--- a/net/base/file_stream.cc
+++ b/net/base/file_stream.cc
@@ -41,16 +41,14 @@ int FileStream::Close(const CompletionCallback& callback) {
}
bool FileStream::IsOpen() const {
- return context_->file().IsValid();
+ return context_->IsOpen();
}
-int FileStream::Seek(base::File::Whence whence,
- int64 offset,
- const Int64CompletionCallback& callback) {
+int FileStream::Seek(int64 offset, const Int64CompletionCallback& callback) {
if (!IsOpen())
return ERR_UNEXPECTED;
- context_->Seek(whence, offset, callback);
+ context_->Seek(offset, callback);
return ERR_IO_PENDING;
}
@@ -88,8 +86,4 @@ int FileStream::Flush(const CompletionCallback& callback) {
return ERR_IO_PENDING;
}
-const base::File& FileStream::GetFileForTesting() const {
- return context_->file();
-}
-
} // namespace net
« base/files/file.h ('K') | « net/base/file_stream.h ('k') | net/base/file_stream_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698