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

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: 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.h ('k') | net/base/file_stream_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream.cc
diff --git a/net/base/file_stream.cc b/net/base/file_stream.cc
index ab0a3bec1c3aba8c655ad7855fa565686a405bcf..81e14ae54822e78765a6f79cc0f35c4781a2f7fa 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_t offset,
- const Int64CompletionCallback& callback) {
+int FileStream::Seek(int64_t 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
« no previous file with comments | « 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