Move temp file functions to base namespace.

BUG=

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

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


CrOS-Libchrome-Original-Commit: 03d9afc0b775748203170a27014a3ee3500aecc2
diff --git a/base/files/file_util_proxy.cc b/base/files/file_util_proxy.cc
index 965b489..a36328e 100644
--- a/base/files/file_util_proxy.cc
+++ b/base/files/file_util_proxy.cc
@@ -76,7 +76,7 @@
   void RunWork(int additional_file_flags) {
     // TODO(darin): file_util should have a variant of CreateTemporaryFile
     // that returns a FilePath and a PlatformFile.
-    file_util::CreateTemporaryFile(&file_path_);
+    base::CreateTemporaryFile(&file_path_);
 
     int file_flags =
         PLATFORM_FILE_WRITE |
diff --git a/base/files/important_file_writer.cc b/base/files/important_file_writer.cc
index 466e95d..261c987 100644
--- a/base/files/important_file_writer.cc
+++ b/base/files/important_file_writer.cc
@@ -58,7 +58,7 @@
   // as target file, so it can be moved in one step, and that the temp file
   // is securely created.
   FilePath tmp_file_path;
-  if (!file_util::CreateTemporaryFileInDir(path.DirName(), &tmp_file_path)) {
+  if (!base::CreateTemporaryFileInDir(path.DirName(), &tmp_file_path)) {
     LogFailure(path, FAILED_CREATING, "could not create temporary file");
     return false;
   }
diff --git a/base/files/scoped_temp_dir.cc b/base/files/scoped_temp_dir.cc
index 497799e..5624a06 100644
--- a/base/files/scoped_temp_dir.cc
+++ b/base/files/scoped_temp_dir.cc
@@ -23,8 +23,7 @@
 
   // This "scoped_dir" prefix is only used on Windows and serves as a template
   // for the unique name.
-  if (!file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("scoped_dir"),
-                                         &path_))
+  if (!base::CreateNewTempDirectory(FILE_PATH_LITERAL("scoped_dir"), &path_))
     return false;
 
   return true;
@@ -39,10 +38,9 @@
     return false;
 
   // Create a new, uniquely named directory under |base_path|.
-  if (!file_util::CreateTemporaryDirInDir(
-          base_path,
-          FILE_PATH_LITERAL("scoped_dir_"),
-          &path_))
+  if (!base::CreateTemporaryDirInDir(base_path,
+                                     FILE_PATH_LITERAL("scoped_dir_"),
+                                     &path_))
     return false;
 
   return true;
diff --git a/base/files/scoped_temp_dir_unittest.cc b/base/files/scoped_temp_dir_unittest.cc
index 02b910c..fe243ce 100644
--- a/base/files/scoped_temp_dir_unittest.cc
+++ b/base/files/scoped_temp_dir_unittest.cc
@@ -13,8 +13,8 @@
 
 TEST(ScopedTempDir, FullPath) {
   FilePath test_path;
-  file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("scoped_temp_dir"),
-                                    &test_path);
+  base::CreateNewTempDirectory(FILE_PATH_LITERAL("scoped_temp_dir"),
+                               &test_path);
 
   // Against an existing dir, it should get destroyed when leaving scope.
   EXPECT_TRUE(DirectoryExists(test_path));
@@ -64,8 +64,8 @@
 TEST(ScopedTempDir, UniqueTempDirUnderPath) {
   // Create a path which will contain a unique temp path.
   FilePath base_path;
-  ASSERT_TRUE(file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("base_dir"),
-                                                &base_path));
+  ASSERT_TRUE(base::CreateNewTempDirectory(FILE_PATH_LITERAL("base_dir"),
+                                           &base_path));
 
   FilePath test_path;
   {