chore: remove deprecated shell.moveItemToTrash() (#26723)

This commit is contained in:
Milan Burda 2020-11-30 21:25:03 +01:00 committed by GitHub
parent 59b4d5c156
commit 09d7b2bc91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 1 additions and 93 deletions

View file

@ -85,16 +85,6 @@ v8::Local<v8::Promise> OpenPath(v8::Isolate* isolate,
return handle;
}
bool MoveItemToTrash(gin::Arguments* args) {
base::FilePath full_path;
args->GetNext(&full_path);
bool delete_on_fail = false;
args->GetNext(&delete_on_fail);
return platform_util::MoveItemToTrash(full_path, delete_on_fail);
}
v8::Local<v8::Promise> TrashItem(v8::Isolate* isolate,
const base::FilePath& path) {
gin_helper::Promise<void> promise(isolate);
@ -181,7 +171,6 @@ void Initialize(v8::Local<v8::Object> exports,
dict.SetMethod("showItemInFolder", &platform_util::ShowItemInFolder);
dict.SetMethod("openPath", &OpenPath);
dict.SetMethod("openExternal", &OpenExternal);
dict.SetMethod("moveItemToTrash", &MoveItemToTrash);
dict.SetMethod("trashItem", &TrashItem);
dict.SetMethod("beep", &platform_util::Beep);
#if defined(OS_WIN)

View file

@ -40,9 +40,6 @@ void OpenExternal(const GURL& url,
const OpenExternalOptions& options,
OpenCallback callback);
// Move a file to trash. (Deprecated.)
bool MoveItemToTrash(const base::FilePath& full_path, bool delete_on_fail);
// Move a file to trash, asynchronously.
void TrashItem(const base::FilePath& full_path,
base::OnceCallback<void(bool, const std::string&)> callback);

View file

@ -153,11 +153,6 @@ bool MoveItemToTrashWithError(const base::FilePath& full_path,
return did_trash;
}
bool MoveItemToTrash(const base::FilePath& path, bool delete_on_fail) {
std::string error; // ignored
return MoveItemToTrashWithError(path, delete_on_fail, &error);
}
namespace internal {
bool PlatformTrashItem(const base::FilePath& full_path, std::string* error) {

View file

@ -422,12 +422,6 @@ bool MoveItemToTrashWithError(const base::FilePath& path,
return true;
}
bool MoveItemToTrash(const base::FilePath& path, bool delete_on_fail) {
std::string error; // ignored
base::win::ScopedCOMInitializer com_initializer;
return MoveItemToTrashWithError(path, delete_on_fail, &error);
}
namespace internal {
bool PlatformTrashItem(const base::FilePath& full_path, std::string* error) {