-
Notifications
You must be signed in to change notification settings - Fork 16.5k
feat: add shell.trashItem() to replace shell.moveItemToTrash() #25114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@electron/wg-api approved this at the August 24, 2020 meeting |
// XXX: is continue_on_shutdown right? | ||
base::ThreadPool::PostTask(FROM_HERE, | ||
{base::MayBlock(), base::WithBaseSyncPrimitives(), | ||
base::TaskPriority::USER_BLOCKING, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why can't this be USER_VISIBLE
instead ? given the api being async, are we really required to respond the user interaction immediately ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the distinction is here technically, but Chromium uses this for its "OpenItem" calls: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/platform_util.cc;l=69;drc=14bd4f1ace32db87ec49e6c535f7910f71f1d89a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I thought there would be a priority difference based on the definition here, but seems like they have same priority https://source.chromium.org/chromium/chromium/src/+/master:base/task/thread_pool/task_tracker.cc;l=480
@deepak1556 @codebytere ping? |
Co-authored-by: Robo <hop2deep@gmail.com>
Release Notes Persisted
|
Description of Change
Closes #11555.
Checklist
npm test
passesRelease Notes
Notes: Added a new asynchronous
shell.trashItem()
API, replacing the synchronousshell.moveItemToTrash()
.