Commit 93eea8b8 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Switch to 1-parameter version of base::DeleteFile() in media/ and remoting/.

The 1-parameter version is simpler, and the 2-parameter version is
deprecated.

Bug: 1009837
Change-Id: I398fbf56c8d8201e665862d12b4dddece5691a0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2285915Reviewed-by: default avatarTed Meyer <tmathmeyer@chromium.org>
Reviewed-by: default avatarLambros Lambrou <lambroslambrou@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786325}
parent f0455470
......@@ -198,7 +198,7 @@ class AudioDebugFileWriterTest
LOG(ERROR) << "Test failed; keeping recording(s) at ["
<< file_path.value().c_str() << "].";
} else {
ASSERT_TRUE(base::DeleteFile(file_path, false));
ASSERT_TRUE(base::DeleteFile(file_path));
}
}
......@@ -262,7 +262,7 @@ TEST_P(AudioDebugFileWriterSingleThreadTest,
LOG(ERROR) << "Test failed; keeping recording(s) at ["
<< file_path.value().c_str() << "].";
} else {
ASSERT_TRUE(base::DeleteFile(file_path, false));
ASSERT_TRUE(base::DeleteFile(file_path));
}
}
......
......@@ -137,7 +137,7 @@ class AudioDebugRecordingHelperTest : public ::testing::Test {
std::move(reply_callback).Run(std::move(debug_file));
// File can be removed right away because MockAudioDebugFileWriter::Start is
// called synchronously.
ASSERT_TRUE(base::DeleteFile(path, false));
ASSERT_TRUE(base::DeleteFile(path));
}
protected:
......
......@@ -137,8 +137,8 @@ TEST_F(AudioDebugRecordingSessionImplTest, CreateWavFileCreatesExpectedFiles) {
EXPECT_CALL(*mock_debug_recording_manager_, DisableDebugRecording());
DestroyDebugRecordingSession();
ShutdownAudioManager();
EXPECT_TRUE(base::DeleteFile(output_recording_filename, false));
EXPECT_TRUE(base::DeleteFile(input_recording_filename, false));
EXPECT_TRUE(base::DeleteFile(output_recording_filename));
EXPECT_TRUE(base::DeleteFile(input_recording_filename));
}
} // namespace media
......@@ -416,8 +416,7 @@ void CameraHalDispatcherImpl::StopOnProxyThread() {
<< " last_modified: " << info.last_modified;
}
if (!base::DeleteFile(base::FilePath(kArcCamera3SocketPath),
/* recursive */ false)) {
if (!base::DeleteFile(base::FilePath(kArcCamera3SocketPath))) {
LOG(ERROR) << "Failed to delete " << kArcCamera3SocketPath;
}
// Close |cancel_pipe_| to quit the loop in WaitForIncomingConnection.
......
......@@ -90,7 +90,7 @@ void ConfigFileWatcherTest::SetUp() {
void ConfigFileWatcherTest::TearDown() {
// Delete the test file.
if (!config_file_.empty())
base::DeleteFile(config_file_, false);
base::DeleteFile(config_file_);
}
// Verifies that the initial notification is delivered.
......
......@@ -249,12 +249,12 @@ int HostService::RunHost() {
}
bool HostService::Disable() {
return base::DeleteFile(enabled_file_, false);
return base::DeleteFile(enabled_file_);
}
bool HostService::Enable() {
// Ensure the config file is private whilst being written.
base::DeleteFile(config_file_, false);
base::DeleteFile(config_file_);
if (!WriteStdinToConfig()) {
return false;
}
......
......@@ -75,7 +75,7 @@ bool PairingRegistryDelegateLinux::DeleteAll() {
bool success = true;
for (base::FilePath pairing_file = enumerator.Next(); !pairing_file.empty();
pairing_file = enumerator.Next()) {
success = success && base::DeleteFile(pairing_file, false);
success = success && base::DeleteFile(pairing_file);
}
return success;
......@@ -140,7 +140,7 @@ bool PairingRegistryDelegateLinux::Delete(const std::string& client_id) {
base::FilePath pairing_file = registry_path.Append(
base::StringPrintf(kPairingFilenameFormat, client_id.c_str()));
return base::DeleteFile(pairing_file, false);
return base::DeleteFile(pairing_file);
}
base::FilePath PairingRegistryDelegateLinux::GetRegistryPath() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment