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

Unified Diff: third_party/crashpad/crashpad/util/posix/close_multiple.cc

Issue 2814043003: Update Crashpad to 1f28a123a4c9449e3d7ddad4ff00dacd366d5216 (Closed)
Patch Set: Add missing GN config to fix compile/link. Created 3 years, 8 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
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

Powered by Google App Engine
This is Rietveld 408576698