| 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 <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
| 11 #include <unistd.h> | 11 #include <unistd.h> |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/metrics/sparse_histogram.h" | 14 #include "base/metrics/histogram_macros.h" |
| 15 #include "base/posix/eintr_wrapper.h" | 15 #include "base/posix/eintr_wrapper.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 17 #include "base/threading/thread_restrictions.h" | 17 #include "base/threading/thread_restrictions.h" |
| 18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 19 | 19 |
| 20 #if defined(OS_ANDROID) | 20 #if defined(OS_ANDROID) |
| 21 #include "base/os_compat_android.h" | 21 #include "base/os_compat_android.h" |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 namespace base { | 24 namespace base { |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 return !HANDLE_EINTR(fsync(file_.get())); | 525 return !HANDLE_EINTR(fsync(file_.get())); |
| 526 #endif | 526 #endif |
| 527 } | 527 } |
| 528 | 528 |
| 529 void File::SetPlatformFile(PlatformFile file) { | 529 void File::SetPlatformFile(PlatformFile file) { |
| 530 DCHECK(!file_.is_valid()); | 530 DCHECK(!file_.is_valid()); |
| 531 file_.reset(file); | 531 file_.reset(file); |
| 532 } | 532 } |
| 533 | 533 |
| 534 } // namespace base | 534 } // namespace base |
| OLD | NEW |