Index: third_party/crashpad/crashpad/util/posix/close_multiple.cc |
diff --git a/third_party/crashpad/crashpad/util/posix/close_multiple.cc b/third_party/crashpad/crashpad/util/posix/close_multiple.cc |
index 3749191b8dc1074ee8c55c74d645c228109ca8bb..908febf3fb92230368a0a0e1068a3ebaa62122ff 100644 |
--- a/third_party/crashpad/crashpad/util/posix/close_multiple.cc |
+++ b/third_party/crashpad/crashpad/util/posix/close_multiple.cc |
@@ -24,7 +24,6 @@ |
#include <unistd.h> |
#include <algorithm> |
-#include <memory> |
#include "base/files/scoped_file.h" |
#include "base/logging.h" |
@@ -32,6 +31,7 @@ |
#include "build/build_config.h" |
#include "util/misc/implicit_cast.h" |
#include "util/numeric/safe_assignment.h" |
+#include "util/posix/scoped_dir.h" |
#if defined(OS_MACOSX) |
#include <sys/sysctl.h> |
@@ -69,18 +69,6 @@ void CloseNowOrOnExec(int fd, bool ebadf_ok) { |
} |
} |
-struct ScopedDIRCloser { |
- void operator()(DIR* dir) const { |
- if (dir) { |
- if (closedir(dir) < 0) { |
- PLOG(ERROR) << "closedir"; |
- } |
- } |
- } |
-}; |
- |
-using ScopedDIR = std::unique_ptr<DIR, ScopedDIRCloser>; |
- |
// This function implements CloseMultipleNowOrOnExec() using an operating |
// system-specific FD directory to determine which file descriptors are open. |
// This is an advantage over looping over all possible file descriptors, because |