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

Unified Diff: base/files/file_enumerator_win.cc

Issue 2909943003: Removing useless Win7 checks + standardize its use (Closed)
Patch Set: Fix reversed conditionnal Created 3 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
« no previous file with comments | « no previous file | base/path_service_unittest.cc » ('j') | base/win/shortcut.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_enumerator_win.cc
diff --git a/base/files/file_enumerator_win.cc b/base/files/file_enumerator_win.cc
index 402a07209a8a24443d750481b75b9025540c2153..13a4433c66209fabe145b70dc813a8307d3cc0b4 100644
--- a/base/files/file_enumerator_win.cc
+++ b/base/files/file_enumerator_win.cc
@@ -9,7 +9,6 @@
#include "base/logging.h"
#include "base/threading/thread_restrictions.h"
-#include "base/win/windows_version.h"
namespace base {
@@ -102,18 +101,14 @@ FilePath FileEnumerator::Next() {
else
src = src.Append(pattern_);
- if (base::win::GetVersion() >= base::win::VERSION_WIN7) {
- // Use a "large fetch" on newer Windows which should speed up large
- // enumerations (we seldom abort in the middle).
- find_handle_ = FindFirstFileEx(src.value().c_str(),
- FindExInfoBasic, // Omit short name.
- &find_data_,
- FindExSearchNameMatch,
- NULL,
- FIND_FIRST_EX_LARGE_FETCH);
- } else {
- find_handle_ = FindFirstFile(src.value().c_str(), &find_data_);
- }
+ // Use a "large fetch" on newer Windows which should speed up large
Nico 2017/06/01 15:01:22 s/on newer Windows//
Patrick Monette 2017/06/02 00:34:04 Done.
+ // enumerations (we seldom abort in the middle).
+ find_handle_ = FindFirstFileEx(src.value().c_str(),
+ FindExInfoBasic, // Omit short name.
+ &find_data_,
+ FindExSearchNameMatch,
+ NULL,
+ FIND_FIRST_EX_LARGE_FETCH);
has_find_data_ = true;
} else {
// Search for the next file/directory.
« no previous file with comments | « no previous file | base/path_service_unittest.cc » ('j') | base/win/shortcut.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698