| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "net/base/file_stream.h" | 5 #include "net/base/file_stream.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/histogram.h" |
| 10 #include "base/logging.h" | 11 #include "base/logging.h" |
| 11 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 12 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 13 | 14 |
| 14 namespace net { | 15 namespace net { |
| 15 | 16 |
| 16 // Ensure that we can just use our Whence values directly. | 17 // Ensure that we can just use our Whence values directly. |
| 17 COMPILE_ASSERT(FROM_BEGIN == FILE_BEGIN, bad_whence_begin); | 18 COMPILE_ASSERT(FROM_BEGIN == FILE_BEGIN, bad_whence_begin); |
| 18 COMPILE_ASSERT(FROM_CURRENT == FILE_CURRENT, bad_whence_current); | 19 COMPILE_ASSERT(FROM_CURRENT == FILE_CURRENT, bad_whence_current); |
| 19 COMPILE_ASSERT(FROM_END == FILE_END, bad_whence_end); | 20 COMPILE_ASSERT(FROM_END == FILE_END, bad_whence_end); |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 DWORD error = GetLastError(); | 336 DWORD error = GetLastError(); |
| 336 LOG(WARNING) << "SetEndOfFile failed: " << error; | 337 LOG(WARNING) << "SetEndOfFile failed: " << error; |
| 337 return MapErrorCode(error); | 338 return MapErrorCode(error); |
| 338 } | 339 } |
| 339 | 340 |
| 340 // Success. | 341 // Success. |
| 341 return seek_position; | 342 return seek_position; |
| 342 } | 343 } |
| 343 | 344 |
| 344 } // namespace net | 345 } // namespace net |
| OLD | NEW |