| Index: base/file_util_posix.cc
|
| diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
|
| index 721f858a33ab6b3d8391718ce3e0cd83c9b79cf5..027337f32c6f90e217bc5e4cc62e2aefca5b7a49 100644
|
| --- a/base/file_util_posix.cc
|
| +++ b/base/file_util_posix.cc
|
| @@ -336,22 +336,6 @@ bool DirectoryExists(const FilePath& path) {
|
| return false;
|
| }
|
|
|
| -} // namespace base
|
| -
|
| -// -----------------------------------------------------------------------------
|
| -
|
| -namespace file_util {
|
| -
|
| -using base::stat_wrapper_t;
|
| -using base::CallStat;
|
| -using base::CallLstat;
|
| -using base::DirectoryExists;
|
| -using base::FileEnumerator;
|
| -using base::FilePath;
|
| -using base::MakeAbsoluteFilePath;
|
| -using base::RealPath;
|
| -using base::VerifySpecificPathControlledByUser;
|
| -
|
| bool ReadFromFD(int fd, char* buffer, size_t bytes) {
|
| size_t total_read = 0;
|
| while (total_read < bytes) {
|
| @@ -372,8 +356,7 @@ bool CreateSymbolicLink(const FilePath& target_path,
|
| symlink_path.value().c_str()) != -1;
|
| }
|
|
|
| -bool ReadSymbolicLink(const FilePath& symlink_path,
|
| - FilePath* target_path) {
|
| +bool ReadSymbolicLink(const FilePath& symlink_path, FilePath* target_path) {
|
| DCHECK(!symlink_path.empty());
|
| DCHECK(target_path);
|
| char buf[PATH_MAX];
|
| @@ -389,7 +372,7 @@ bool ReadSymbolicLink(const FilePath& symlink_path,
|
| }
|
|
|
| bool GetPosixFilePermissions(const FilePath& path, int* mode) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK(mode);
|
|
|
| stat_wrapper_t file_info;
|
| @@ -404,7 +387,7 @@ bool GetPosixFilePermissions(const FilePath& path, int* mode) {
|
|
|
| bool SetPosixFilePermissions(const FilePath& path,
|
| int mode) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| + ThreadRestrictions::AssertIOAllowed();
|
| DCHECK((mode & ~FILE_PERMISSION_MASK) == 0);
|
|
|
| // Calls stat() so that we can preserve the higher bits like S_ISGID.
|
| @@ -422,6 +405,22 @@ bool SetPosixFilePermissions(const FilePath& path,
|
| return true;
|
| }
|
|
|
| +} // namespace base
|
| +
|
| +// -----------------------------------------------------------------------------
|
| +
|
| +namespace file_util {
|
| +
|
| +using base::stat_wrapper_t;
|
| +using base::CallStat;
|
| +using base::CallLstat;
|
| +using base::DirectoryExists;
|
| +using base::FileEnumerator;
|
| +using base::FilePath;
|
| +using base::MakeAbsoluteFilePath;
|
| +using base::RealPath;
|
| +using base::VerifySpecificPathControlledByUser;
|
| +
|
| // Creates and opens a temporary file in |directory|, returning the
|
| // file descriptor. |path| is set to the temporary file path.
|
| // This function does NOT unlink() the file.
|
|
|