Move file_util::Delete to the base namespace

BUG=

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

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


CrOS-Libchrome-Original-Commit: 918efbf64de58c82ffa3cd8799d9ad822811a37a
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index cbe8f26..7626957 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -738,9 +738,9 @@
   FilePath non_existent = temp_dir_.path().AppendASCII("bogus_file_dne.foobar");
   ASSERT_FALSE(file_util::PathExists(non_existent));
 
-  EXPECT_TRUE(file_util::Delete(non_existent, false));
+  EXPECT_TRUE(base::Delete(non_existent, false));
   ASSERT_FALSE(file_util::PathExists(non_existent));
-  EXPECT_TRUE(file_util::Delete(non_existent, true));
+  EXPECT_TRUE(base::Delete(non_existent, true));
   ASSERT_FALSE(file_util::PathExists(non_existent));
 }
 
@@ -751,7 +751,7 @@
   ASSERT_TRUE(file_util::PathExists(file_name));
 
   // Make sure it's deleted
-  EXPECT_TRUE(file_util::Delete(file_name, false));
+  EXPECT_TRUE(base::Delete(file_name, false));
   EXPECT_FALSE(file_util::PathExists(file_name));
 
   // Test recursive case, create a new file
@@ -760,7 +760,7 @@
   ASSERT_TRUE(file_util::PathExists(file_name));
 
   // Make sure it's deleted
-  EXPECT_TRUE(file_util::Delete(file_name, true));
+  EXPECT_TRUE(base::Delete(file_name, true));
   EXPECT_FALSE(file_util::PathExists(file_name));
 }
 
@@ -777,7 +777,7 @@
       << "Failed to create symlink.";
 
   // Delete the symbolic link.
-  EXPECT_TRUE(file_util::Delete(file_link, false));
+  EXPECT_TRUE(base::Delete(file_link, false));
 
   // Make sure original file is not deleted.
   EXPECT_FALSE(file_util::PathExists(file_link));
@@ -799,7 +799,7 @@
   EXPECT_FALSE(file_util::PathExists(file_link));
 
   // Delete the symbolic link.
-  EXPECT_TRUE(file_util::Delete(file_link, false));
+  EXPECT_TRUE(base::Delete(file_link, false));
 
   // Make sure the symbolic link is deleted.
   EXPECT_FALSE(file_util::IsLink(file_link));
@@ -843,7 +843,7 @@
             file_util::ReadFile(file_name, buffer, buffer_size));
 
   // Delete the file.
-  EXPECT_TRUE(file_util::Delete(file_name, false));
+  EXPECT_TRUE(base::Delete(file_name, false));
   EXPECT_FALSE(file_util::PathExists(file_name));
 
   delete[] buffer;
@@ -888,7 +888,7 @@
   EXPECT_TRUE(file_util::PathIsWritable(file_name));
 
   // Delete the file.
-  EXPECT_TRUE(file_util::Delete(file_name, false));
+  EXPECT_TRUE(base::Delete(file_name, false));
   EXPECT_FALSE(file_util::PathExists(file_name));
 }
 
@@ -940,7 +940,7 @@
   EXPECT_EQ(c2.size(), 1);
 
   // Delete the file.
-  EXPECT_TRUE(file_util::Delete(subdir_path, true));
+  EXPECT_TRUE(base::Delete(subdir_path, true));
   EXPECT_FALSE(file_util::PathExists(subdir_path));
 }
 
@@ -965,12 +965,12 @@
   directory_contents = directory_contents.Append(FPL("*"));
 
   // Delete non-recursively and check that only the file is deleted
-  EXPECT_TRUE(file_util::Delete(directory_contents, false));
+  EXPECT_TRUE(base::Delete(directory_contents, false));
   EXPECT_FALSE(file_util::PathExists(file_name));
   EXPECT_TRUE(file_util::PathExists(subdir_path));
 
   // Delete recursively and make sure all contents are deleted
-  EXPECT_TRUE(file_util::Delete(directory_contents, true));
+  EXPECT_TRUE(base::Delete(directory_contents, true));
   EXPECT_FALSE(file_util::PathExists(file_name));
   EXPECT_FALSE(file_util::PathExists(subdir_path));
 }
@@ -988,11 +988,11 @@
   directory_contents = directory_contents.Append(FPL("*"));
 
   // Delete non-recursively and check nothing got deleted
-  EXPECT_TRUE(file_util::Delete(directory_contents, false));
+  EXPECT_TRUE(base::Delete(directory_contents, false));
   EXPECT_TRUE(file_util::PathExists(subdir_path));
 
   // Delete recursively and check nothing got deleted
-  EXPECT_TRUE(file_util::Delete(directory_contents, true));
+  EXPECT_TRUE(base::Delete(directory_contents, true));
   EXPECT_TRUE(file_util::PathExists(subdir_path));
 }
 #endif
@@ -1017,11 +1017,11 @@
   ASSERT_TRUE(file_util::PathExists(subdir_path2));
 
   // Delete non-recursively and check that the empty dir got deleted
-  EXPECT_TRUE(file_util::Delete(subdir_path2, false));
+  EXPECT_TRUE(base::Delete(subdir_path2, false));
   EXPECT_FALSE(file_util::PathExists(subdir_path2));
 
   // Delete non-recursively and check that nothing got deleted
-  EXPECT_FALSE(file_util::Delete(test_subdir, false));
+  EXPECT_FALSE(base::Delete(test_subdir, false));
   EXPECT_TRUE(file_util::PathExists(test_subdir));
   EXPECT_TRUE(file_util::PathExists(file_name));
   EXPECT_TRUE(file_util::PathExists(subdir_path1));
@@ -1047,11 +1047,11 @@
   ASSERT_TRUE(file_util::PathExists(subdir_path2));
 
   // Delete recursively and check that the empty dir got deleted
-  EXPECT_TRUE(file_util::Delete(subdir_path2, true));
+  EXPECT_TRUE(base::Delete(subdir_path2, true));
   EXPECT_FALSE(file_util::PathExists(subdir_path2));
 
   // Delete recursively and check that everything got deleted
-  EXPECT_TRUE(file_util::Delete(test_subdir, true));
+  EXPECT_TRUE(base::Delete(test_subdir, true));
   EXPECT_FALSE(file_util::PathExists(file_name));
   EXPECT_FALSE(file_util::PathExists(subdir_path1));
   EXPECT_FALSE(file_util::PathExists(test_subdir));
@@ -1695,7 +1695,7 @@
   for (int i = 0; i < 3; i++)
     EXPECT_FALSE(temp_files[i] == temp_files[(i+1)%3]);
   for (int i = 0; i < 3; i++)
-    EXPECT_TRUE(file_util::Delete(temp_files[i], false));
+    EXPECT_TRUE(base::Delete(temp_files[i], false));
 }
 
 TEST_F(FileUtilTest, CreateAndOpenTemporaryFileTest) {
@@ -1718,7 +1718,7 @@
   // Close and delete.
   for (i = 0; i < 3; ++i) {
     EXPECT_TRUE(file_util::CloseFile(fps[i]));
-    EXPECT_TRUE(file_util::Delete(names[i], false));
+    EXPECT_TRUE(base::Delete(names[i], false));
   }
 }
 
@@ -1727,7 +1727,7 @@
   ASSERT_TRUE(file_util::CreateNewTempDirectory(FilePath::StringType(),
                                                 &temp_dir));
   EXPECT_TRUE(file_util::PathExists(temp_dir));
-  EXPECT_TRUE(file_util::Delete(temp_dir, false));
+  EXPECT_TRUE(base::Delete(temp_dir, false));
 }
 
 TEST_F(FileUtilTest, CreateNewTemporaryDirInDirTest) {
@@ -1738,7 +1738,7 @@
                   &new_dir));
   EXPECT_TRUE(file_util::PathExists(new_dir));
   EXPECT_TRUE(temp_dir_.path().IsParent(new_dir));
-  EXPECT_TRUE(file_util::Delete(new_dir, false));
+  EXPECT_TRUE(base::Delete(new_dir, false));
 }
 
 TEST_F(FileUtilTest, GetShmemTempDirTest) {
@@ -1771,7 +1771,7 @@
   EXPECT_TRUE(file_util::PathExists(test_path));
   EXPECT_FALSE(file_util::CreateDirectory(test_path));
 
-  EXPECT_TRUE(file_util::Delete(test_root, true));
+  EXPECT_TRUE(base::Delete(test_root, true));
   EXPECT_FALSE(file_util::PathExists(test_root));
   EXPECT_FALSE(file_util::PathExists(test_path));
 
@@ -1817,9 +1817,9 @@
   CreateTextFile(test_path, L"test file");
   EXPECT_TRUE(file_util::PathExists(test_path));
   EXPECT_FALSE(file_util::DirectoryExists(test_path));
-  EXPECT_TRUE(file_util::Delete(test_path, false));
+  EXPECT_TRUE(base::Delete(test_path, false));
 
-  EXPECT_TRUE(file_util::Delete(test_root, true));
+  EXPECT_TRUE(base::Delete(test_root, true));
 }
 
 TEST_F(FileUtilTest, FileEnumeratorTest) {
@@ -1937,13 +1937,13 @@
 
   // Create a fresh, empty copy of this directory.
   if (file_util::PathExists(data_dir)) {
-    ASSERT_TRUE(file_util::Delete(data_dir, true));
+    ASSERT_TRUE(base::Delete(data_dir, true));
   }
   ASSERT_TRUE(file_util::CreateDirectory(data_dir));
 
   // Create a fresh, empty copy of this directory.
   if (file_util::PathExists(data_dir)) {
-    ASSERT_TRUE(file_util::Delete(data_dir, true));
+    ASSERT_TRUE(base::Delete(data_dir, true));
   }
   ASSERT_TRUE(file_util::CreateDirectory(data_dir));
   FilePath foobar(data_dir.Append(FILE_PATH_LITERAL("foobar.txt")));
@@ -1965,7 +1965,7 @@
 
   // Create a fresh, empty copy of this directory.
   if (file_util::PathExists(data_dir)) {
-    ASSERT_TRUE(file_util::Delete(data_dir, true));
+    ASSERT_TRUE(base::Delete(data_dir, true));
   }
   ASSERT_TRUE(file_util::CreateDirectory(data_dir));