Move Posix file utils to the base namespace.

BUG=
R=rvargas@chromium.org

Review URL: https://codereview.chromium.org/89523002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237642 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: b264eab5d4331e19d04f5822be50c88c61b58267
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index 721f858..027337f 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -336,22 +336,6 @@
   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 @@
                    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 GetPosixFilePermissions(const FilePath& path, int* mode) {
-  base::ThreadRestrictions::AssertIOAllowed();
+  ThreadRestrictions::AssertIOAllowed();
   DCHECK(mode);
 
   stat_wrapper_t file_info;
@@ -404,7 +387,7 @@
 
 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 @@
   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.