Move FileEnumerator to its own file, do some refactoring.
It creates a class FileInfo to contain the details rather than using a platform-specific typedef. This allows the accessors GetName, GetSize, etc. to be moved directly to this class (previously they were static helpers on the FileEnumerator class) which makes a bunch of code much cleaner. It also gives reasonable getting and initialization which the previous version lacked.
BUG=175002
Reland of 198820 and 298824
Original review = https://codereview.chromium.org/13165005
[email protected]
Review URL: https://codereview.chromium.org/16392011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205019 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/common/extensions/unpacker.cc b/chrome/common/extensions/unpacker.cc
index 9fb5aae..eeceac5e 100644
--- a/chrome/common/extensions/unpacker.cc
+++ b/chrome/common/extensions/unpacker.cc
@@ -7,6 +7,7 @@
#include <set>
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/scoped_temp_dir.h"
#include "base/i18n/rtl.h"
#include "base/json/json_file_value_serializer.h"
@@ -127,9 +128,9 @@
temp_install_dir_.Append(kLocaleFolder);
// Not all folders under _locales have to be valid locales.
- file_util::FileEnumerator locales(locales_path,
- false,
- file_util::FileEnumerator::DIRECTORIES);
+ base::FileEnumerator locales(locales_path,
+ false,
+ base::FileEnumerator::DIRECTORIES);
std::set<std::string> all_locales;
extension_l10n_util::GetAllLocales(&all_locales);