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

Unified Diff: chrome/browser/profiles/profile_manager.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
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index a1ed001fe17b19e9026519dde70ace801855abf0..12ae9e37d0abf22dab6c818b9affe36b225d67b9 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -10,6 +10,7 @@
#include "base/command_line.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"
@@ -94,14 +95,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