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

Unified Diff: webkit/dom_storage/dom_storage_context.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 | « webkit/database/database_tracker.cc ('k') | webkit/fileapi/file_system_database_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/dom_storage/dom_storage_context.cc
diff --git a/webkit/dom_storage/dom_storage_context.cc b/webkit/dom_storage/dom_storage_context.cc
index 80df0093f37a7002d54c21ce3efb0f012e886604..e169e41b41e6b20670c18513b328c6c17c1c6aba 100644
--- a/webkit/dom_storage/dom_storage_context.cc
+++ b/webkit/dom_storage/dom_storage_context.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/guid.h"
#include "base/location.h"
#include "base/time.h"
@@ -18,8 +19,6 @@
#include "webkit/dom_storage/session_storage_database.h"
#include "webkit/quota/special_storage_policy.h"
-using file_util::FileEnumerator;
-
namespace dom_storage {
static const int kSessionStoraceScavengingSeconds = 60;
@@ -87,18 +86,17 @@ void DomStorageContext::GetLocalStorageUsage(
bool include_file_info) {
if (localstorage_directory_.empty())
return;
- FileEnumerator enumerator(localstorage_directory_, false,
- FileEnumerator::FILES);
+ base::FileEnumerator enumerator(localstorage_directory_, false,
+ base::FileEnumerator::FILES);
for (base::FilePath path = enumerator.Next(); !path.empty();
path = enumerator.Next()) {
if (path.MatchesExtension(DomStorageArea::kDatabaseFileExtension)) {
LocalStorageUsageInfo info;
info.origin = DomStorageArea::OriginFromDatabaseFileName(path);
if (include_file_info) {
- FileEnumerator::FindInfo find_info;
- enumerator.GetFindInfo(&find_info);
- info.data_size = FileEnumerator::GetFilesize(find_info);
- info.last_modified = FileEnumerator::GetLastModifiedTime(find_info);
+ base::FileEnumerator::FileInfo find_info = enumerator.GetInfo();
+ info.data_size = find_info.GetSize();
+ info.last_modified = find_info.GetLastModifiedTime();
}
infos->push_back(info);
}
« no previous file with comments | « webkit/database/database_tracker.cc ('k') | webkit/fileapi/file_system_database_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698