Audit unused extension system event notification code. |
|||||||
Issue descriptionAudit unused extension system event notification code. ExtensionSystemEventObserver is unused; ditto for functions it calls: extensions::DispatchBrightnessChangedEvent extensions::DispatchWokeUpEvent extensions::DispatchScreenUnlockedEvent It was added here: https://codereview.chromium.org/26692002 This CL disabled the only use, afaict: https://codereview.chromium.org/608283003 It seems like this code was disabled without being completely removed/audited. We should audit extensions referencing this functionality, and remove whatever's unneeded. This came up in https://codereview.chromium.org/2427913003 (that ports volume notifications to a similar class)
,
Mar 3 2017
,
Mar 9 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 16 2018
Can we just remove the class ExtensionSystemEventObserver I looked up usage for SYSTEM_PRIVATE_ON_BRIGHTNESS_CHANGED, SYSTEM_PRIVATE_ON_SCREEN_UNLOCKED, SYSTEM_PRIVATE_ON_VOLUME_CHANGED, SYSTEM_PRIVATE_ON_WOKE_UP, events, and didn't find any usage, so all of these can be removed. ref: http://shortn/_sdp3mUHhzj Assigning to tbarzic@, can you or someone else take a look at this?
,
Mar 17 2018
tengs - it seems that easy_unlock app uses systemPrivate.onWokeUp; well, tries to use. Chrome hasn't been dispatching the event for a while (around 3.5 years). Given that this hasn't been causing issues, I think it should be safe to remove the event all together.
,
Apr 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/82b10c1825e41707fbe93f2984678b534b211022 commit 82b10c1825e41707fbe93f2984678b534b211022 Author: Toni Barzic <tbarzic@chromium.org> Date: Mon Apr 16 19:44:02 2018 Remove unused systemPrivate API events Removes the following events: systemPrivate.onVolumeChanged systemPrivate.onBrightnessChanged systemPrivate.onScreenUnlocked systemPrivate.onWokeUp None of them seem to be used. Additionally, code that dispatches all listed events except systemPrivate.onVolumeChanged has been unreachable for some time. Bug:658006 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: I104873a45b3274a7105215dd906881065a962527 Reviewed-on: https://chromium-review.googlesource.com/967421 Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Commit-Queue: Toni Barzic <tbarzic@chromium.org> Cr-Commit-Position: refs/heads/master@{#551079} [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/browser/chromeos/BUILD.gn [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/browser/chromeos/chrome_browser_main_chromeos.cc [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/browser/chromeos/chrome_browser_main_chromeos.h [delete] https://crrev.com/a9d29a7aecf3042132247b323f79703605a272c0/chrome/browser/chromeos/extensions/extension_system_event_observer.cc [delete] https://crrev.com/a9d29a7aecf3042132247b323f79703605a272c0/chrome/browser/chromeos/extensions/extension_system_event_observer.h [delete] https://crrev.com/a9d29a7aecf3042132247b323f79703605a272c0/chrome/browser/chromeos/extensions/extension_volume_observer.cc [delete] https://crrev.com/a9d29a7aecf3042132247b323f79703605a272c0/chrome/browser/chromeos/extensions/extension_volume_observer.h [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/browser/extensions/api/system_private/system_private_api.cc [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/browser/extensions/api/system_private/system_private_api.h [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/common/extensions/api/system_private.json [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/third_party/closure_compiler/externs/system_private.js
,
Apr 16 2018
,
Apr 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/82b10c1825e41707fbe93f2984678b534b211022 commit 82b10c1825e41707fbe93f2984678b534b211022 Author: Toni Barzic <tbarzic@chromium.org> Date: Mon Apr 16 19:44:02 2018 Remove unused systemPrivate API events Removes the following events: systemPrivate.onVolumeChanged systemPrivate.onBrightnessChanged systemPrivate.onScreenUnlocked systemPrivate.onWokeUp None of them seem to be used. Additionally, code that dispatches all listed events except systemPrivate.onVolumeChanged has been unreachable for some time. Bug:658006 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: I104873a45b3274a7105215dd906881065a962527 Reviewed-on: https://chromium-review.googlesource.com/967421 Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Commit-Queue: Toni Barzic <tbarzic@chromium.org> Cr-Commit-Position: refs/heads/master@{#551079} [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/browser/chromeos/BUILD.gn [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/browser/chromeos/chrome_browser_main_chromeos.cc [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/browser/chromeos/chrome_browser_main_chromeos.h [delete] https://crrev.com/a9d29a7aecf3042132247b323f79703605a272c0/chrome/browser/chromeos/extensions/extension_system_event_observer.cc [delete] https://crrev.com/a9d29a7aecf3042132247b323f79703605a272c0/chrome/browser/chromeos/extensions/extension_system_event_observer.h [delete] https://crrev.com/a9d29a7aecf3042132247b323f79703605a272c0/chrome/browser/chromeos/extensions/extension_volume_observer.cc [delete] https://crrev.com/a9d29a7aecf3042132247b323f79703605a272c0/chrome/browser/chromeos/extensions/extension_volume_observer.h [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/browser/extensions/api/system_private/system_private_api.cc [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/browser/extensions/api/system_private/system_private_api.h [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/chrome/common/extensions/api/system_private.json [modify] https://crrev.com/82b10c1825e41707fbe93f2984678b534b211022/third_party/closure_compiler/externs/system_private.js |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by st...@chromium.org
, Mar 3 2017