Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

nornagon
Copy link
Contributor

Description of Change

Closes #11555.

Checklist

Release Notes

Notes: Added a new asynchronous shell.trashItem() API, replacing the synchronous shell.moveItemToTrash().

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Aug 24, 2020
@jkleinsc
Copy link
Member

@electron/wg-api approved this at the August 24, 2020 meeting

docs/api/shell.md Show resolved Hide resolved
// XXX: is continue_on_shutdown right?
base::ThreadPool::PostTask(FROM_HERE,
{base::MayBlock(), base::WithBaseSyncPrimitives(),
base::TaskPriority::USER_BLOCKING,
Copy link
Member

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 ?

Copy link
Contributor Author

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

Copy link
Member

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

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Aug 25, 2020
@nornagon
Copy link
Contributor Author

@deepak1556 @codebytere ping?

shell/common/platform_util_mac.mm Outdated Show resolved Hide resolved
nornagon and others added 2 commits September 1, 2020 12:20
@nornagon nornagon merged commit 1b6534b into master Sep 2, 2020
@release-clerk
Copy link

release-clerk bot commented Sep 2, 2020

Release Notes Persisted

Added a new asynchronous shell.trashItem() API, replacing the synchronous shell.moveItemToTrash().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

async shell.moveItemToTrash ?

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.