Index: net/disk_cache/simple/simple_index_file.cc |
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc |
index 0136be1c5a063049617d2abf628bcec61968c0da..938ae8eb3c587a30937e134fedcc0e3198d0f2a1 100644 |
--- a/net/disk_cache/simple/simple_index_file.cc |
+++ b/net/disk_cache/simple/simple_index_file.cc |
@@ -242,9 +242,10 @@ void SimpleIndexFile::SyncLoadIndexEntries( |
index_file_state = INDEX_STATE_STALE; |
} else { |
index_file_state = INDEX_STATE_FRESH; |
- base::Time latest_dir_mtime; |
- if (simple_util::GetMTime(cache_directory, &latest_dir_mtime) && |
- IsIndexFileStale(latest_dir_mtime, index_file_path)) { |
+ base::PlatformFileInfo file_info; |
+ bool file_info_result = file_util::GetFileInfo(index_file_path, &file_info); |
+ DCHECK(file_info_result); |
+ if (IsIndexFileStale(file_info.last_modified, index_file_path)) { |
// A file operation has updated the directory since we last looked at it |
// during backend initialization. |
index_file_state = INDEX_STATE_FRESH_CONCURRENT_UPDATES; |
@@ -418,10 +419,10 @@ void SimpleIndexFile::SyncRestoreFromDisk( |
// static |
bool SimpleIndexFile::IsIndexFileStale(base::Time cache_last_modified, |
const base::FilePath& index_file_path) { |
- base::Time index_mtime; |
- if (!simple_util::GetMTime(index_file_path, &index_mtime)) |
+ base::PlatformFileInfo file_info; |
+ if (!file_util::GetFileInfo(index_file_path, &file_info)) |
return true; |
- return index_mtime < cache_last_modified; |
+ return file_info.last_modified < cache_last_modified; |
} |
} // namespace disk_cache |