| 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_util.h" | 5 #include "base/files/file_util.h" |
| 6 | 6 |
| 7 #include <dirent.h> | 7 #include <dirent.h> |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <fcntl.h> | 9 #include <fcntl.h> |
| 10 #include <libgen.h> | 10 #include <libgen.h> |
| 11 #include <limits.h> | 11 #include <limits.h> |
| 12 #include <stddef.h> | 12 #include <stddef.h> |
| 13 #include <stdio.h> | 13 #include <stdio.h> |
| 14 #include <stdlib.h> | 14 #include <stdlib.h> |
| 15 #include <string.h> | 15 #include <string.h> |
| 16 #include <sys/errno.h> | |
| 17 #include <sys/mman.h> | 16 #include <sys/mman.h> |
| 18 #include <sys/param.h> | 17 #include <sys/param.h> |
| 19 #include <sys/stat.h> | 18 #include <sys/stat.h> |
| 20 #include <sys/time.h> | 19 #include <sys/time.h> |
| 21 #include <sys/types.h> | 20 #include <sys/types.h> |
| 22 #include <time.h> | 21 #include <time.h> |
| 23 #include <unistd.h> | 22 #include <unistd.h> |
| 24 | 23 |
| 25 #include "base/environment.h" | 24 #include "base/environment.h" |
| 26 #include "base/files/file_enumerator.h" | 25 #include "base/files/file_enumerator.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 49 | 48 |
| 50 #if defined(OS_ANDROID) | 49 #if defined(OS_ANDROID) |
| 51 #include "base/android/content_uri_utils.h" | 50 #include "base/android/content_uri_utils.h" |
| 52 #include "base/os_compat_android.h" | 51 #include "base/os_compat_android.h" |
| 53 #endif | 52 #endif |
| 54 | 53 |
| 55 #if !defined(OS_IOS) | 54 #if !defined(OS_IOS) |
| 56 #include <grp.h> | 55 #include <grp.h> |
| 57 #endif | 56 #endif |
| 58 | 57 |
| 58 #if !defined(OS_FUCHSIA) |
| 59 #include <sys/errno.h> |
| 60 #endif // OS_FUCHSIA |
| 61 |
| 59 namespace base { | 62 namespace base { |
| 60 | 63 |
| 61 namespace { | 64 namespace { |
| 62 | 65 |
| 63 #if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL) | 66 #if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL) |
| 64 static int CallStat(const char *path, stat_wrapper_t *sb) { | 67 static int CallStat(const char *path, stat_wrapper_t *sb) { |
| 65 ThreadRestrictions::AssertIOAllowed(); | 68 ThreadRestrictions::AssertIOAllowed(); |
| 66 return stat(path, sb); | 69 return stat(path, sb); |
| 67 } | 70 } |
| 68 static int CallLstat(const char *path, stat_wrapper_t *sb) { | 71 static int CallLstat(const char *path, stat_wrapper_t *sb) { |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 return false; | 1016 return false; |
| 1014 | 1017 |
| 1015 DeleteFile(from_path, true); | 1018 DeleteFile(from_path, true); |
| 1016 return true; | 1019 return true; |
| 1017 } | 1020 } |
| 1018 | 1021 |
| 1019 } // namespace internal | 1022 } // namespace internal |
| 1020 | 1023 |
| 1021 #endif // !defined(OS_NACL_NONSFI) | 1024 #endif // !defined(OS_NACL_NONSFI) |
| 1022 } // namespace base | 1025 } // namespace base |
| OLD | NEW |