| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/files/file.h" | 5 #include "base/files/file.h" |
| 6 | 6 |
| 7 #include <io.h> | 7 #include <io.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/metrics/sparse_histogram.h" | 11 #include "base/metrics/histogram_macros.h" |
| 12 #include "base/threading/thread_restrictions.h" | 12 #include "base/threading/thread_restrictions.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 | 15 |
| 16 // Make sure our Whence mappings match the system headers. | 16 // Make sure our Whence mappings match the system headers. |
| 17 static_assert(File::FROM_BEGIN == FILE_BEGIN && | 17 static_assert(File::FROM_BEGIN == FILE_BEGIN && |
| 18 File::FROM_CURRENT == FILE_CURRENT && | 18 File::FROM_CURRENT == FILE_CURRENT && |
| 19 File::FROM_END == FILE_END, | 19 File::FROM_END == FILE_END, |
| 20 "whence mapping must match the system headers"); | 20 "whence mapping must match the system headers"); |
| 21 | 21 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 DCHECK(IsValid()); | 401 DCHECK(IsValid()); |
| 402 SCOPED_FILE_TRACE("Flush"); | 402 SCOPED_FILE_TRACE("Flush"); |
| 403 return ::FlushFileBuffers(file_.Get()) != FALSE; | 403 return ::FlushFileBuffers(file_.Get()) != FALSE; |
| 404 } | 404 } |
| 405 | 405 |
| 406 void File::SetPlatformFile(PlatformFile file) { | 406 void File::SetPlatformFile(PlatformFile file) { |
| 407 file_.Set(file); | 407 file_.Set(file); |
| 408 } | 408 } |
| 409 | 409 |
| 410 } // namespace base | 410 } // namespace base |
| OLD | NEW |