Index: base/files/file_enumerator.h |
diff --git a/base/files/file_enumerator.h b/base/files/file_enumerator.h |
index 38bb8337c70fb2ad19af6ea8fc1086beda1cfca6..65d39540d20499b5187ad2a8dadbcebfda708f92 100644 |
--- a/base/files/file_enumerator.h |
+++ b/base/files/file_enumerator.h |
@@ -5,6 +5,8 @@ |
#ifndef BASE_FILES_FILE_ENUMERATOR_H_ |
#define BASE_FILES_FILE_ENUMERATOR_H_ |
+#include <sys/stat.h> |
+#include <unistd.h> |
#include <stack> |
#include <vector> |
@@ -14,13 +16,6 @@ |
#include "base/time/time.h" |
#include "build/build_config.h" |
-#if defined(OS_WIN) |
-#include <windows.h> |
-#elif defined(OS_POSIX) |
-#include <sys/stat.h> |
-#include <unistd.h> |
-#endif |
- |
namespace base { |
// A class for enumerating the files in a provided path. The order of the |
@@ -52,24 +47,13 @@ class BASE_EXPORT FileEnumerator { |
int64 GetSize() const; |
Time GetLastModifiedTime() const; |
-#if defined(OS_WIN) |
- // Note that the cAlternateFileName (used to hold the "short" 8.3 name) |
- // of the WIN32_FIND_DATA will be empty. Since we don't use short file |
- // names, we tell Windows to omit it which speeds up the query slightly. |
- const WIN32_FIND_DATA& find_data() const { return find_data_; } |
-#elif defined(OS_POSIX) |
const struct stat& stat() const { return stat_; } |
-#endif |
private: |
friend class FileEnumerator; |
-#if defined(OS_WIN) |
- WIN32_FIND_DATA find_data_; |
-#elif defined(OS_POSIX) |
struct stat stat_; |
FilePath filename_; |
-#endif |
}; |
enum FileType { |
@@ -124,13 +108,7 @@ class BASE_EXPORT FileEnumerator { |
// Returns true if the given path should be skipped in enumeration. |
bool ShouldSkip(const FilePath& path); |
-#if defined(OS_WIN) |
- // True when find_data_ is valid. |
- bool has_find_data_; |
- WIN32_FIND_DATA find_data_; |
- HANDLE find_handle_; |
-#elif defined(OS_POSIX) |
- |
+#if defined(OS_POSIX) |
// Read the filenames in source into the vector of DirectoryEntryInfo's |
static bool ReadDirectory(std::vector<FileInfo>* entries, |
const FilePath& source, bool show_links); |