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

Unified Diff: base/files/file_win.cc

Issue 323683002: net: FileStream cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DCHECK, fix ASSERT message Created 6 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
Index: base/files/file_win.cc
diff --git a/base/files/file_win.cc b/base/files/file_win.cc
index 9e18bda70b1c93b68f6b1983e4772e16b96fbed0..e9a7b4c0ed2622313037c15df03a001adfb8a6f1 100644
--- a/base/files/file_win.cc
+++ b/base/files/file_win.cc
@@ -13,6 +13,11 @@
namespace base {
+// Make sure our Whence mappings match the system headers.
+COMPILE_ASSERT(File::FROM_BEGIN == FILE_BEGIN &&
+ File::FROM_CURRENT == FILE_CURRENT &&
+ File::FROM_END == FILE_END, whence_matches_system);
+
void File::InitializeUnsafe(const FilePath& name, uint32 flags) {
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(!IsValid());
@@ -119,8 +124,6 @@ void File::Close() {
int64 File::Seek(Whence whence, int64 offset) {
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(IsValid());
- if (offset < 0)
- return -1;
LARGE_INTEGER distance, res;
distance.QuadPart = offset;

Powered by Google App Engine
This is Rietveld 408576698