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

Unified Diff: net/disk_cache/simple/simple_index_file_posix.cc

Issue 2774923002: Try to speed up SimpleCache index re-sync on Windows. (Closed)
Patch Set: git cl try Created 3 years, 9 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 | « net/disk_cache/simple/simple_index_file.cc ('k') | net/disk_cache/simple/simple_index_file_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_index_file_posix.cc
diff --git a/net/disk_cache/simple/simple_index_file_posix.cc b/net/disk_cache/simple/simple_index_file_posix.cc
index e0dd3dd126a98801b5711eb892d8ca79bd9b3bfc..9fa387e030cb263c5be2e78b54b392bbbd45c1a1 100644
--- a/net/disk_cache/simple/simple_index_file_posix.cc
+++ b/net/disk_cache/simple/simple_index_file_posix.cc
@@ -12,6 +12,7 @@
#include <memory>
#include <string>
+#include "base/files/file_util.h"
#include "base/logging.h"
namespace disk_cache {
@@ -43,7 +44,14 @@ bool SimpleIndexFile::TraverseCacheDirectory(
continue;
const base::FilePath file_path = cache_path.Append(
base::FilePath(file_name));
- entry_file_callback.Run(file_path);
+ base::File::Info file_info;
+ if (!base::GetFileInfo(file_path, &file_info)) {
+ LOG(ERROR) << "Could not get file info for " << file_path.value();
+ continue;
+ }
+
+ entry_file_callback.Run(file_path, file_info.last_accessed,
+ file_info.last_modified, file_info.size);
}
PLOG(ERROR) << "readdir_r " << cache_path.value();
return false;
« no previous file with comments | « net/disk_cache/simple/simple_index_file.cc ('k') | net/disk_cache/simple/simple_index_file_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698