Commit e8a954c9 authored by husky@google.com's avatar husky@google.com

Delete FileAutoDeleter.

All existing users were updated to use ScopedTempDir in
http://codereview.chromium.org/7056011/.
Review URL: http://codereview.chromium.org/7008012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86805 0039d316-1c4b-4281-b951-d872f2087c98
parent a1f7bba4
...@@ -1892,8 +1892,6 @@ ...@@ -1892,8 +1892,6 @@
'test/browser_with_test_window_test.cc', 'test/browser_with_test_window_test.cc',
'test/browser_with_test_window_test.h', 'test/browser_with_test_window_test.h',
'test/data/resource.rc', 'test/data/resource.rc',
'test/file_test_utils.cc',
'test/file_test_utils.h',
'test/menu_model_test.cc', 'test/menu_model_test.cc',
'test/menu_model_test.h', 'test/menu_model_test.h',
'test/render_view_test.cc', 'test/render_view_test.cc',
...@@ -3083,7 +3081,6 @@ ...@@ -3083,7 +3081,6 @@
'browser/sync/util/extensions_activity_monitor_unittest.cc', 'browser/sync/util/extensions_activity_monitor_unittest.cc',
'browser/sync/util/protobuf_unittest.cc', 'browser/sync/util/protobuf_unittest.cc',
'browser/sync/util/user_settings_unittest.cc', 'browser/sync/util/user_settings_unittest.cc',
'test/file_test_utils.cc',
'test/sync/engine/mock_connection_manager.cc', 'test/sync/engine/mock_connection_manager.cc',
'test/sync/engine/mock_connection_manager.h', 'test/sync/engine/mock_connection_manager.h',
'test/sync/engine/mock_gaia_authenticator.cc', 'test/sync/engine/mock_gaia_authenticator.cc',
......
// 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.
#include "chrome/test/file_test_utils.h"
FileAutoDeleter::FileAutoDeleter(const FilePath& path)
: path_(path) {
}
FileAutoDeleter::~FileAutoDeleter() {
file_util::Delete(path_, true);
}
// Copyright (c) 2010 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_
#pragma once
#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_COPY_AND_ASSIGN(FileAutoDeleter);
};
#endif // CHROME_TEST_FILE_TEST_UTILS_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment