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

Unified Diff: webkit/browser/dom_storage/dom_storage_context.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
« no previous file with comments | « webkit/browser/database/database_tracker.cc ('k') | webkit/browser/fileapi/isolated_file_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/dom_storage/dom_storage_context.cc
diff --git a/webkit/browser/dom_storage/dom_storage_context.cc b/webkit/browser/dom_storage/dom_storage_context.cc
index 7cfcead61a1563d901ba892bd9aa70d3b6ce20c9..7b5da67ef140d15f2ee5adc63f19a4b5529e2825 100644
--- a/webkit/browser/dom_storage/dom_storage_context.cc
+++ b/webkit/browser/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/browser/quota/special_storage_policy.h"
#include "webkit/common/dom_storage/dom_storage_types.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/browser/database/database_tracker.cc ('k') | webkit/browser/fileapi/isolated_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698