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

Unified Diff: base/process/launch_posix.cc

Issue 168643002: Convert scoped_ptr_malloc -> scoped_ptr, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/memory/scoped_ptr_unittest.cc ('k') | base/process/process_info_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/launch_posix.cc
diff --git a/base/process/launch_posix.cc b/base/process/launch_posix.cc
index daa055dfee9ef667f4d09d87bde76e4d98fb4f51..84a05d61105e9b0cd4980fb66724e09a3887c3ae 100644
--- a/base/process/launch_posix.cc
+++ b/base/process/launch_posix.cc
@@ -181,16 +181,16 @@ void ResetChildSignalHandlersToDefaults(void) {
} // anonymous namespace
-// A class to handle auto-closing of DIR*'s.
-class ScopedDIRClose {
- public:
+// Functor for |ScopedDIR| (below).
+struct ScopedDIRClose {
inline void operator()(DIR* x) const {
- if (x) {
+ if (x)
closedir(x);
- }
}
};
-typedef scoped_ptr_malloc<DIR, ScopedDIRClose> ScopedDIR;
+
+// Automatically closes |DIR*|s.
+typedef scoped_ptr<DIR, ScopedDIRClose> ScopedDIR;
#if defined(OS_LINUX)
static const char kFDDir[] = "/proc/self/fd";
« no previous file with comments | « base/memory/scoped_ptr_unittest.cc ('k') | base/process/process_info_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698