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

Unified Diff: net/base/file_stream_context_win.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: 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
« no previous file with comments | « net/base/file_stream_context_posix.cc ('k') | net/base/file_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream_context_win.cc
diff --git a/net/base/file_stream_context_win.cc b/net/base/file_stream_context_win.cc
index 1a39384c5ee66d3ab843e977aa5ccae36788ec0a..11e5f2d384e59d768629bbc5a2c6a8ddb7111e01 100644
--- a/net/base/file_stream_context_win.cc
+++ b/net/base/file_stream_context_win.cc
@@ -114,17 +114,11 @@ int FileStream::Context::Write(IOBuffer* buf,
return ERR_IO_PENDING;
}
-FileStream::Context::IOResult FileStream::Context::SeekFileImpl(
- base::File::Whence whence,
- int64 offset) {
+FileStream::Context::IOResult FileStream::Context::SeekFileImpl(int64 offset) {
davidben 2015/05/21 17:22:12 If I'm understanding this correctly, not calling s
LARGE_INTEGER result;
- result.QuadPart = file_.Seek(whence, offset);
- if (result.QuadPart >= 0) {
- SetOffset(&io_context_.overlapped, result);
- return IOResult(result.QuadPart, 0);
- }
-
- return IOResult::FromOSError(GetLastError());
+ result.QuadPart = offset;
+ SetOffset(&io_context_.overlapped, result);
+ return IOResult(result.QuadPart, 0);
}
void FileStream::Context::OnFileOpened() {
« no previous file with comments | « net/base/file_stream_context_posix.cc ('k') | net/base/file_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698