| Index: base/file_util.cc
|
| diff --git a/base/file_util.cc b/base/file_util.cc
|
| index 6140ceae28ab5980395ce2c0db96eeed76388e0f..8bcf1a46c64246634a90f29deb045ddafc1fbe77 100644
|
| --- a/base/file_util.cc
|
| +++ b/base/file_util.cc
|
| @@ -173,42 +173,36 @@ bool GetFileSize(const FilePath& file_path, int64* file_size) {
|
| return true;
|
| }
|
|
|
| -} // namespace base
|
| -
|
| -// -----------------------------------------------------------------------------
|
| -
|
| -namespace file_util {
|
| -
|
| -using base::FileEnumerator;
|
| -using base::FilePath;
|
| -using base::kMaxUniqueFiles;
|
| -
|
| bool TouchFile(const FilePath& path,
|
| - const base::Time& last_accessed,
|
| - const base::Time& last_modified) {
|
| - int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_WRITE_ATTRIBUTES;
|
| + const Time& last_accessed,
|
| + const Time& last_modified) {
|
| + int flags = PLATFORM_FILE_OPEN | PLATFORM_FILE_WRITE_ATTRIBUTES;
|
|
|
| #if defined(OS_WIN)
|
| // On Windows, FILE_FLAG_BACKUP_SEMANTICS is needed to open a directory.
|
| if (DirectoryExists(path))
|
| - flags |= base::PLATFORM_FILE_BACKUP_SEMANTICS;
|
| + flags |= PLATFORM_FILE_BACKUP_SEMANTICS;
|
| #endif // OS_WIN
|
|
|
| - const base::PlatformFile file =
|
| - base::CreatePlatformFile(path, flags, NULL, NULL);
|
| - if (file != base::kInvalidPlatformFileValue) {
|
| - bool result = base::TouchPlatformFile(file, last_accessed, last_modified);
|
| - base::ClosePlatformFile(file);
|
| + const PlatformFile file = CreatePlatformFile(path, flags, NULL, NULL);
|
| + if (file != kInvalidPlatformFileValue) {
|
| + bool result = TouchPlatformFile(file, last_accessed, last_modified);
|
| + ClosePlatformFile(file);
|
| return result;
|
| }
|
|
|
| return false;
|
| }
|
|
|
| -bool SetLastModifiedTime(const FilePath& path,
|
| - const base::Time& last_modified) {
|
| - return TouchFile(path, last_modified, last_modified);
|
| -}
|
| +} // namespace base
|
| +
|
| +// -----------------------------------------------------------------------------
|
| +
|
| +namespace file_util {
|
| +
|
| +using base::FileEnumerator;
|
| +using base::FilePath;
|
| +using base::kMaxUniqueFiles;
|
|
|
| bool CloseFile(FILE* file) {
|
| if (file == NULL)
|
|
|