| 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 <sys/stat.h> | 9 #include <sys/stat.h> |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| 11 | 11 |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/metrics/sparse_histogram.h" | 14 #include "base/metrics/sparse_histogram.h" |
| 15 // TODO(rvargas): remove this (needed for kInvalidPlatformFileValue). | |
| 16 #include "base/platform_file.h" | |
| 17 #include "base/posix/eintr_wrapper.h" | 15 #include "base/posix/eintr_wrapper.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 19 #include "base/threading/thread_restrictions.h" | 17 #include "base/threading/thread_restrictions.h" |
| 20 | 18 |
| 21 #if defined(OS_ANDROID) | 19 #if defined(OS_ANDROID) |
| 22 #include "base/os_compat_android.h" | 20 #include "base/os_compat_android.h" |
| 23 #endif | 21 #endif |
| 24 | 22 |
| 25 namespace base { | 23 namespace base { |
| 26 | 24 |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 return FILE_ERROR_FAILED; | 482 return FILE_ERROR_FAILED; |
| 485 } | 483 } |
| 486 } | 484 } |
| 487 | 485 |
| 488 void File::SetPlatformFile(PlatformFile file) { | 486 void File::SetPlatformFile(PlatformFile file) { |
| 489 DCHECK(!file_.is_valid()); | 487 DCHECK(!file_.is_valid()); |
| 490 file_.reset(file); | 488 file_.reset(file); |
| 491 } | 489 } |
| 492 | 490 |
| 493 } // namespace base | 491 } // namespace base |
| OLD | NEW |