Index: cloud_print/virtual_driver/win/port_monitor/port_monitor.cc |
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc |
index c13228adff54c9997ebbf11ed3d7940a95e77a85..900828577a4e26887920af78cc2960ee509d0ed2 100644 |
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc |
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc |
@@ -15,6 +15,7 @@ |
#include "base/at_exit.h" |
#include "base/command_line.h" |
#include "base/file_util.h" |
+#include "base/files/file_enumerator.h" |
#include "base/logging.h" |
#include "base/path_service.h" |
#include "base/process.h" |
@@ -119,14 +120,11 @@ base::FilePath GetAppDataDir() { |
// Delete files which where not deleted by chrome. |
void DeleteLeakedFiles(const base::FilePath& dir) { |
- using file_util::FileEnumerator; |
base::Time delete_before = base::Time::Now() - base::TimeDelta::FromDays(1); |
- FileEnumerator enumerator(dir, false, FileEnumerator::FILES); |
+ base::FileEnumerator enumerator(dir, false, base::FileEnumerator::FILES); |
for (base::FilePath file_path = enumerator.Next(); !file_path.empty(); |
file_path = enumerator.Next()) { |
- FileEnumerator::FindInfo info; |
- enumerator.GetFindInfo(&info); |
- if (FileEnumerator::GetLastModifiedTime(info) < delete_before) |
+ if (enumerator.GetInfo().GetLastModifiedTime() < delete_before) |
file_util::Delete(file_path, false); |
} |
} |