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

Unified Diff: cloud_print/virtual_driver/win/port_monitor/port_monitor.cc

Issue 13165005: Move FileEnumerator to its own file, do some refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge, fixes Created 7 years, 7 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 | « chrome_frame/test/reliability/page_load_test.cc ('k') | cloud_print/virtual_driver/win/virtual_driver.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « chrome_frame/test/reliability/page_load_test.cc ('k') | cloud_print/virtual_driver/win/virtual_driver.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698