aver-updater: remove 2-param base::DeleteFile

The function would be deprecated after libchrome r822064 uprev. Use
base::DeleteFile(path) for non-recursive and
base::DeletePathRecursively(path) for recursive calls respectively.

BUG=chromium:1144735
TEST=cros_run_unit_tests --board=fizz --packages aver-updater

Change-Id: I5ac51f97f845e169d4e8318f5cbd3fae65ae3609
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/aver-updater/+/2593803
Tested-by: Grace Cham <hscham@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Qijiang Fan <fqj@google.com>
Reviewed-by: Kyle Williams <kdgwill@chromium.org>
Commit-Queue: Grace Cham <hscham@chromium.org>
diff --git a/src/model_two_device.cc b/src/model_two_device.cc
index b66a41e..3fe5fe5 100644
--- a/src/model_two_device.cc
+++ b/src/model_two_device.cc
@@ -134,12 +134,12 @@
   for (int i = 0; i < device_fw_num_; i++) {
     base::FilePath file_path = temp_path_.Append(kImagePath[i]);
     if (!ReadFirmwareFileToBuffer(file_path, &firmware_buffer_[i])) {
-      base::DeleteFile(temp_path_, true);
+      base::DeletePathRecursively(temp_path_);
       return AverStatus::READ_FW_TO_BUF_FAILED;
     }
   }
 
-  if (!base::DeleteFile(temp_path_, true))
+  if (!base::DeletePathRecursively(temp_path_))
     LOG(ERROR) << "Failed to delete untar firmware.";
 
   return status;
@@ -414,4 +414,4 @@
   }
 
   return AverStatus::NO_ERROR;
-}
\ No newline at end of file
+}
diff --git a/src/target_device.cc b/src/target_device.cc
index 8a30bfd..0b4132b 100644
--- a/src/target_device.cc
+++ b/src/target_device.cc
@@ -131,7 +131,7 @@
   }
 
   if (is_untar_file_necessary_) {
-    if (!base::DeleteFile(temp_path_, true))
+    if (!base::DeletePathRecursively(temp_path_))
         LOG(ERROR) << "Failed to delete untar firmware.";
   }
 
diff --git a/src/utilities_unittest.cc b/src/utilities_unittest.cc
index 139fc82..5004321 100644
--- a/src/utilities_unittest.cc
+++ b/src/utilities_unittest.cc
@@ -48,7 +48,7 @@
   std::string file_content;
   EXPECT_TRUE(ReadFileContent(test_file, &file_content));
   EXPECT_EQ(0, file_content.compare("test"));
-  ASSERT_TRUE(base::DeleteFile(file_path, true));
+  ASSERT_TRUE(base::DeletePathRecursively(file_path));
 }
 
 TEST_F(UtilsTest, ReadFileContentReturnFalse) {
@@ -61,7 +61,7 @@
   std::string file_content;
   EXPECT_FALSE(ReadFileContent(empty_path, &file_content));
   EXPECT_FALSE(ReadFileContent(test_file, &file_content));
-  ASSERT_TRUE(base::DeleteFile(file_path, true));
+  ASSERT_TRUE(base::DeletePathRecursively(file_path));
 }
 
 TEST_F(UtilsTest, VerifyDeviceResponseReturnTrue) {