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

Unified Diff: base/file_util.cc

Issue 3439019: Revert "Add a TouchFile function that operates on FilePaths + fixing a bug" (Closed)
Patch Set: Created 10 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 | « base/file_util.h ('k') | base/file_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.cc
diff --git a/base/file_util.cc b/base/file_util.cc
index 747232bc3196c7d6d98429ad029dcb4bd3a1099a..e6189035b105ef44b04f35857b7ef1d6c54e7c77 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -200,28 +200,6 @@ bool IsDotDot(const FilePath& path) {
return FILE_PATH_LITERAL("..") == path.BaseName().value();
}
-bool TouchFile(const FilePath& path,
- const base::Time& last_accessed,
- const base::Time& last_modified) {
- base::PlatformFile file =
- base::CreatePlatformFile(path,
- base::PLATFORM_FILE_OPEN |
- base::PLATFORM_FILE_WRITE_ATTRIBUTES,
- NULL, NULL);
- if (file != base::kInvalidPlatformFileValue) {
- bool result = base::TouchPlatformFile(file, last_accessed, last_modified);
- base::ClosePlatformFile(file);
- return result;
- }
-
- return false;
-}
-
-bool SetLastModifiedTime(const FilePath& path,
- const base::Time& last_modified) {
- return TouchFile(path, last_modified, last_modified);
-}
-
bool CloseFile(FILE* file) {
if (file == NULL)
return true;
« no previous file with comments | « base/file_util.h ('k') | base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698