问题
I know that in the case when some extension is updated and requires additional permissions compared to a previously installed version, a dialog with the permission warnings will be shown.
My question is: is any dialog is going to be shown if some permissions are removed compared to the previous extension version?
回答1:
is any dialog is going to be shown if some permissions is cutted off comparing with the previous extension version?
If your permissions decrease, no dialog will be shown.
Interesting fact: Chrome will still consider those permissions granted on installs that had the broad-permissions version before.
So if your next version reintroduces the same permission, only users that had the restricted-permission version as their first installed version will be notified. Makes it easier (but still not completely trivial) to recover from accidental permission deletion.
From the source code (thanks to Sungguk Lim for the link):
// Extensions can also silently upgrade to less permissions, and then
// silently upgrade to a version that adds these permissions back.
// The extension could then release a new version that
// removes the "omnibox" permission. When the user upgrades, Chrome will
// still remember that "omnibox" had been granted, so that if the
// extension once again includes "omnibox" in an upgrade, the extension
// can upgrade without requiring this user's approval.
回答2:
Extension will be disabled when permissions increase, and dialog will be shown
See actual chromium code: https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/extensions/extension_service.cc&sq=package:chromium&type=cs&l=1582&rcl=1453955600
回答3:
According to the answers here if I hypothetically follow this path of publications in chrome store:
- step 1) Publish extension example_v1 / permissions x
- step 2) Update extension to example_v2 / permissions x+y (increasing permissions)
- step 3) Update extension to example_v3 / permissions x (decreasing permissions to the initial state (v1))
The final state of the extension should be enabled once the permissions at the end will be the same as at the beginning, isn't it?
Could be possible that once chrome mark your extension as disabled (step 2) it doesn't mark it as enabled again by itself, but the user should do it instead?
来源:https://stackoverflow.com/questions/35059914/dialog-with-permissions-language-on-chrome-extension-update