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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 16392011: Move FileEnumerator to its own file, do some refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix incorrect includes Created 7 years, 6 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
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index c107156b5c6de1b3a40ac47c7218d0e5eff0c4b3..9833faba5a1e2f2ed075f8a5b5d1e3e34a1bdf7a 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -11,6 +11,7 @@
#include "base/debug/trace_event.h"
#include "base/deferred_sequenced_task_runner.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/metrics/histogram.h"
#include "base/prefs/pref_registry_simple.h"
@@ -96,14 +97,10 @@ std::vector<base::FilePath>& ProfilesToDelete() {
int64 ComputeFilesSize(const base::FilePath& directory,
const base::FilePath::StringType& pattern) {
int64 running_size = 0;
- file_util::FileEnumerator iter(directory, false,
- file_util::FileEnumerator::FILES,
- pattern);
- while (!iter.Next().empty()) {
- file_util::FileEnumerator::FindInfo info;
- iter.GetFindInfo(&info);
- running_size += file_util::FileEnumerator::GetFilesize(info);
- }
+ base::FileEnumerator iter(directory, false, base::FileEnumerator::FILES,
+ pattern);
+ while (!iter.Next().empty())
+ running_size += iter.GetInfo().GetSize();
return running_size;
}
« no previous file with comments | « chrome/browser/printing/printing_layout_browsertest.cc ('k') | chrome/browser/profiles/profile_shortcut_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698