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

Unified Diff: base/files/file_enumerator.h

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 years, 1 month 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 | « base/files/file.h ('k') | base/files/file_enumerator_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « base/files/file.h ('k') | base/files/file_enumerator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698