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

Unified Diff: chrome/browser/extensions/api/storage/settings_backend.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/extensions/api/storage/settings_backend.cc
diff --git a/chrome/browser/extensions/api/storage/settings_backend.cc b/chrome/browser/extensions/api/storage/settings_backend.cc
index 369446ada8c67f9de47d0d3e3b074990e1832bb8..26a15629022195d92221037598bede3bfe2c27eb 100644
--- a/chrome/browser/extensions/api/storage/settings_backend.cc
+++ b/chrome/browser/extensions/api/storage/settings_backend.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/extensions/api/storage/settings_backend.h"
-#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/logging.h"
#include "chrome/browser/extensions/api/storage/settings_sync_processor.h"
#include "chrome/browser/extensions/api/storage/settings_sync_util.h"
@@ -105,13 +105,10 @@ std::set<std::string> SettingsBackend::GetKnownExtensionIDs() const {
}
// Leveldb databases are directories inside base_path_.
- file_util::FileEnumerator::FindInfo find_info;
- file_util::FileEnumerator extension_dirs(
- base_path_, false, file_util::FileEnumerator::DIRECTORIES);
+ base::FileEnumerator extension_dirs(
+ base_path_, false, base::FileEnumerator::DIRECTORIES);
while (!extension_dirs.Next().empty()) {
- extension_dirs.GetFindInfo(&find_info);
- base::FilePath extension_dir(
- file_util::FileEnumerator::GetFilename(find_info));
+ base::FilePath extension_dir = extension_dirs.GetInfo().GetName();
DCHECK(!extension_dir.IsAbsolute());
// Extension IDs are created as std::strings so they *should* be ASCII.
std::string maybe_as_ascii(extension_dir.MaybeAsASCII());

Powered by Google App Engine
This is Rietveld 408576698