Chromium Code Reviews| Index: base/test/test_file_util.h |
| diff --git a/base/test/test_file_util.h b/base/test/test_file_util.h |
| index ce0b30259371cd845ab90d45f592a395cb82b5da..ba597c4cb8d946f5a5b4ba5fc740eee3693db67d 100644 |
| --- a/base/test/test_file_util.h |
| +++ b/base/test/test_file_util.h |
| @@ -11,6 +11,7 @@ |
| #include <string> |
| #include "base/compiler_specific.h" |
| +#include "base/file_path.h" |
| class FilePath; |
| @@ -56,6 +57,20 @@ FilePath WStringAsFilePath(const std::wstring& path); |
| bool MakeFileUnreadable(const FilePath& path) WARN_UNUSED_RESULT; |
| bool MakeFileUnwritable(const FilePath& path) WARN_UNUSED_RESULT; |
| +// Saves the current permissions for a path, and restores it on destruction. |
| +class PermissionRestorer { |
| + public: |
| + explicit PermissionRestorer(const FilePath& path); |
| + ~PermissionRestorer(); |
| + |
| + private: |
| + const FilePath path_; |
| + void* info_; // The opaque stored permission information. |
| + size_t length_; // the length of the stored permission information. |
|
Paweł Hajdan Jr.
2012/03/02 12:26:25
nit: "the" -> "The" (capital T)
ahendrickson
2012/03/02 17:51:57
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(PermissionRestorer); |
| +}; |
| + |
| } // namespace file_util |
| #endif // BASE_TEST_TEST_FILE_UTIL_H_ |