GoogleChromeLabs / chromeos_smart_card_connector

Smart Card Connector App for Chrome OS
https://chrome.google.com/webstore/detail/smart-card-connector/khpfeaanjngmcnplbdlpegiifgpfgdco
Apache License 2.0
133 stars 50 forks source link

[mv3] Use Fetch API in TrustedClientsRegistry #1157

Closed emaxx-google closed 2 months ago

emaxx-google commented 2 months ago

Switch the JSON fetching code from goog.net.XhrIo, which essentially is XMLHttpRequest, to the Fetch API.

Not only is the Fetch API more concise and promise-friendly. The main reason is that XMLHttpRequest is unsupported in Service Worker contexts, hence this was one of the blockers for the manifestv3 migration.

github-actions[bot] commented 2 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.35% lines.

emaxx-google commented 2 months ago

Thanks! PTAL. I've also dropped the json.js helper since it's not needed anymore with the Fetch API.

github-actions[bot] commented 2 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.29% lines.