| Index: webkit/fileapi/file_system_file_util.cc
|
| diff --git a/webkit/fileapi/file_system_file_util.cc b/webkit/fileapi/file_system_file_util.cc
|
| index 484a3c512882ebfedf8ad4e2ea48155e4ad300a1..b542104d1569734974f967c05ebac4f15176b795 100644
|
| --- a/webkit/fileapi/file_system_file_util.cc
|
| +++ b/webkit/fileapi/file_system_file_util.cc
|
| @@ -22,20 +22,6 @@ FileSystemFileUtil::FileSystemFileUtil(FileSystemFileUtil* underlying_file_util)
|
| FileSystemFileUtil::~FileSystemFileUtil() {
|
| }
|
|
|
| -PlatformFileError FileSystemFileUtil::Delete(
|
| - FileSystemOperationContext* context,
|
| - const FileSystemPath& path,
|
| - bool recursive) {
|
| - if (DirectoryExists(context, path)) {
|
| - if (!recursive)
|
| - return DeleteSingleDirectory(context, path);
|
| - else
|
| - return DeleteDirectoryRecursive(context, path);
|
| - } else {
|
| - return DeleteFile(context, path);
|
| - }
|
| -}
|
| -
|
| PlatformFileError FileSystemFileUtil::CreateOrOpen(
|
| FileSystemOperationContext* context,
|
| const FileSystemPath& path, int file_flags,
|
| @@ -246,37 +232,4 @@ PlatformFileError FileSystemFileUtil::DeleteSingleDirectory(
|
| return base::PLATFORM_FILE_ERROR_FAILED;
|
| }
|
|
|
| -PlatformFileError FileSystemFileUtil::DeleteDirectoryRecursive(
|
| - FileSystemOperationContext* context,
|
| - const FileSystemPath& path) {
|
| - scoped_ptr<AbstractFileEnumerator> file_enum(
|
| - CreateFileEnumerator(context, path));
|
| - FilePath file_path_each;
|
| - std::stack<FilePath> directories;
|
| - while (!(file_path_each = file_enum->Next()).empty()) {
|
| - if (file_enum->IsDirectory()) {
|
| - directories.push(file_path_each);
|
| - } else {
|
| - // DeleteFile here is the virtual overridden member function.
|
| - PlatformFileError error = DeleteFile(
|
| - context, path.WithInternalPath(file_path_each));
|
| - if (error == base::PLATFORM_FILE_ERROR_NOT_FOUND)
|
| - return base::PLATFORM_FILE_ERROR_FAILED;
|
| - else if (error != base::PLATFORM_FILE_OK)
|
| - return error;
|
| - }
|
| - }
|
| -
|
| - while (!directories.empty()) {
|
| - PlatformFileError error = DeleteSingleDirectory(
|
| - context, path.WithInternalPath(directories.top()));
|
| - if (error == base::PLATFORM_FILE_ERROR_NOT_FOUND)
|
| - return base::PLATFORM_FILE_ERROR_FAILED;
|
| - else if (error != base::PLATFORM_FILE_OK)
|
| - return error;
|
| - directories.pop();
|
| - }
|
| - return DeleteSingleDirectory(context, path);
|
| -}
|
| -
|
| } // namespace fileapi
|
|
|