
The PEPC element needs to get the overall permission status including the device status in order to correctly decide which text to present to the user. This CL ensures that the PEPC observer will receive the permission status including the device status, while not changing the functionality for other observers. This is done by adding a new parameter to the `AddObserver` call: `should_include_device_status`. This parameter is trickled all the way down to the `PermissionManager` where it is used when calculating the permission status for that subscription only, whenever that is done. *Reviewers*: This CL makes mechanical changes to many files, but the only logical changes are: * chrome_permissions_client.cc - implement OS device status interaction for Mac * components/permissions/permission_context_base.h - define new `AlwaysIncludeDeviceStatus` function which allows the `GeolocationPermissionContextAndroid` to keep its current functionality * `components/permissions/permission_manager.cc` - use the new `should_include_device_status` parameter to decide whether to include the device status when getting the permission status. * html_permission_element.cc - make the AddObserver call with `should_include_device_status` = true Fixed: 335834559 Change-Id: Ia8cf68010c9b596520a6b4c5fc61ad24577452f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5483406 Reviewed-by: Peter Beverloo <peter@chromium.org> Reviewed-by: David Song <wintermelons@google.com> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Reviewed-by: Peter Kvitek <kvitekp@chromium.org> Reviewed-by: Thomas Nguyen <tungnh@chromium.org> Reviewed-by: Antonio Sartori <antoniosartori@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Andy Paicu <andypaicu@chromium.org> Reviewed-by: Sean Topping <seantopping@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: Eugene Zemtsov <eugene@chromium.org> Cr-Commit-Position: refs/heads/main@{#1299563}