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

Unified Diff: base/process_util_posix.cc

Issue 2804042: Incomplete changes to make scoped_ptr_malloc use plain functions. (Closed)
Patch Set: chrome now builds & links Created 10 years, 5 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 | « base/file_util.h ('k') | base/scoped_ptr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_posix.cc
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index cae70a5c59a6b0d10c67ae70140a5bc56ab3b8ff..ad63e8a8184d88fc48ac8853405e0c258444e8ea 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -182,16 +182,7 @@ bool KillProcess(ProcessHandle process_id, int exit_code, bool wait) {
return result;
}
-// A class to handle auto-closing of DIR*'s.
-class ScopedDIRClose {
- public:
- inline void operator()(DIR* x) const {
- if (x) {
- closedir(x);
- }
- }
-};
-typedef scoped_ptr_malloc<DIR, ScopedDIRClose> ScopedDIR;
+typedef scoped_ptr_malloc<DIR, FreeFnIgnoreReturn<DIR, closedir> > ScopedDIR;
#if defined(OS_LINUX)
static const rlim_t kSystemDefaultMaxFds = 8192;
« no previous file with comments | « base/file_util.h ('k') | base/scoped_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698