diff options
author | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-29 21:08:14 +0000 |
---|---|---|
committer | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-29 21:08:14 +0000 |
commit | f1a8760cc11a49cf1aca88c76712bc2d55a8f5ac (patch) | |
tree | 255902f572beac669f3efa7ffc86a6ea82b0e4d3 /chrome/test/file_test_utils.h | |
parent | 6af916aa551e6d6ce44404ab8775da015bb6d533 (diff) | |
download | chromium_src-f1a8760cc11a49cf1aca88c76712bc2d55a8f5ac.zip chromium_src-f1a8760cc11a49cf1aca88c76712bc2d55a8f5ac.tar.gz chromium_src-f1a8760cc11a49cf1aca88c76712bc2d55a8f5ac.tar.bz2 |
Clean-up temporary files/folders in firefox importer tests.
Review URL: http://codereview.chromium.org/115930
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17238 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/file_test_utils.h')
-rw-r--r-- | chrome/test/file_test_utils.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/chrome/test/file_test_utils.h b/chrome/test/file_test_utils.h new file mode 100644 index 0000000..22368b9 --- /dev/null +++ b/chrome/test/file_test_utils.h @@ -0,0 +1,24 @@ +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_TEST_FILE_TEST_UTILS_H_ +#define CHROME_TEST_FILE_TEST_UTILS_H_ + +#include "base/file_path.h" +#include "base/file_util.h" + +// Auto deletes file/folder when it goes out-of-scope. This is useful for tests +// to cleanup files/folder automatically. +class FileAutoDeleter { + public: + explicit FileAutoDeleter(const FilePath& path); + ~FileAutoDeleter(); + + const FilePath& path() { return path_; } + private: + FilePath path_; + DISALLOW_EVIL_CONSTRUCTORS(FileAutoDeleter); +}; + +#endif // CHROME_TEST_FILE_TEST_UTILS_H_ |