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

Unified Diff: base/file_util.h

Issue 9351014: Mac app mode: locate Chrome + refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Misc. fixes Created 8 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 | « no previous file | chrome/app/app_mode_loader_mac.mm » ('j') | chrome/app/app_mode_loader_mac.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index 177711ec0e83a8866cdfc4a50b535224fe5b6b26..4bdd8da52d9fa15f07ba62a215ba9bafa6e86169 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -438,6 +438,18 @@ class ScopedFILEClose {
typedef scoped_ptr_malloc<FILE, ScopedFILEClose> ScopedFILE;
+// A class to handle auto-deleting a directory.
Mark Mentovai 2012/02/07 19:36:42 Would ScopedTempDir (base/scoped_temp_dir.h) work
jeremy 2012/02/09 10:52:51 Done.
+class ScopedDirectoryDelete {
+ public:
+ inline void operator()(FilePath* x) const {
+ if (x) {
+ file_util::Delete(*x, true);
+ }
+ }
+};
+
+typedef scoped_ptr_malloc<FilePath, ScopedDirectoryDelete> ScopedDirectory;
+
#if defined(OS_POSIX)
// A class to handle auto-closing of FDs.
class ScopedFDClose {
« no previous file with comments | « no previous file | chrome/app/app_mode_loader_mac.mm » ('j') | chrome/app/app_mode_loader_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698