Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: webrtc/base/file_unittest.cc

Issue 2347473003: Removing, opening and creating files in platform_file and file (Closed)
Patch Set: Comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/file_posix.cc ('k') | webrtc/base/file_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/file_unittest.cc
diff --git a/webrtc/base/file_unittest.cc b/webrtc/base/file_unittest.cc
index 458b6da75f2642dfead3d72786579903ca57e84a..edf2b29127a5ede58a160afb94efcde5a36d9a5a 100644
--- a/webrtc/base/file_unittest.cc
+++ b/webrtc/base/file_unittest.cc
@@ -8,10 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
#include <limits>
#include <memory>
#include <string>
@@ -32,14 +28,6 @@
namespace rtc {
-void RemoveFile(const std::string& path) {
-#if defined(WEBRTC_WIN)
- ::DeleteFile(ToUtf16(path).c_str());
-#else
- ::unlink(path.c_str());
-#endif
-}
-
int LastError() {
#if defined(WEBRTC_WIN)
return ::GetLastError();
@@ -69,7 +57,7 @@ class FileTest : public ::testing::Test {
ASSERT_FALSE(path_.empty());
}
rtc::File OpenTempFile() { return rtc::File::Open(path_); }
- void TearDown() { RemoveFile(path_); }
+ void TearDown() { rtc::RemoveFile(path_); }
};
TEST_F(FileTest, DoubleClose) {
« no previous file with comments | « webrtc/base/file_posix.cc ('k') | webrtc/base/file_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698