OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_TEST_FILE_TEST_UTILS_H_ |
| 6 #define CHROME_TEST_FILE_TEST_UTILS_H_ |
| 7 |
| 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" |
| 10 |
| 11 // Auto deletes file/folder when it goes out-of-scope. This is useful for tests |
| 12 // to cleanup files/folder automatically. |
| 13 class FileAutoDeleter { |
| 14 public: |
| 15 explicit FileAutoDeleter(const FilePath& path); |
| 16 ~FileAutoDeleter(); |
| 17 |
| 18 const FilePath& path() { return path_; } |
| 19 private: |
| 20 FilePath path_; |
| 21 DISALLOW_EVIL_CONSTRUCTORS(FileAutoDeleter); |
| 22 }; |
| 23 |
| 24 #endif // CHROME_TEST_FILE_TEST_UTILS_H_ |
OLD | NEW |