| 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" | |
| 11 #include "base/logging.h" | 10 #include "base/logging.h" |
| 12 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 13 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 14 | 13 |
| 15 namespace net { | 14 namespace net { |
| 16 | 15 |
| 17 // Ensure that we can just use our Whence values directly. | 16 // Ensure that we can just use our Whence values directly. |
| 18 COMPILE_ASSERT(FROM_BEGIN == FILE_BEGIN, bad_whence_begin); | 17 COMPILE_ASSERT(FROM_BEGIN == FILE_BEGIN, bad_whence_begin); |
| 19 COMPILE_ASSERT(FROM_CURRENT == FILE_CURRENT, bad_whence_current); | 18 COMPILE_ASSERT(FROM_CURRENT == FILE_CURRENT, bad_whence_current); |
| 20 COMPILE_ASSERT(FROM_END == FILE_END, bad_whence_end); | 19 COMPILE_ASSERT(FROM_END == FILE_END, bad_whence_end); |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 DWORD error = GetLastError(); | 335 DWORD error = GetLastError(); |
| 337 LOG(WARNING) << "SetEndOfFile failed: " << error; | 336 LOG(WARNING) << "SetEndOfFile failed: " << error; |
| 338 return MapErrorCode(error); | 337 return MapErrorCode(error); |
| 339 } | 338 } |
| 340 | 339 |
| 341 // Success. | 340 // Success. |
| 342 return seek_position; | 341 return seek_position; |
| 343 } | 342 } |
| 344 | 343 |
| 345 } // namespace net | 344 } // namespace net |
| OLD | NEW |