Store TTS engine extension voices in extension prefs.
A TTS engine extension can advertise the set of voices it provides either using the extension manifest, or by calling chrome.ttsEngine.updateVoices to provide a dynamic list. Previously we cached the set of dynamic voices provided by updateVoices in a map in TtsEngineExtensionObserver. That works fine if a TTS extension has a chance to run. However, on profile load, installed extensions don't typically run. That means that when a web page queries the set of installed voices, it gets the list of voices from the manifest, not the dynamic list of voices. This is only fixed once the extension spins up, typically when speech starts. Instead, when an extension calls chrome.ttsEngine.updateVoices, cache the voices in the extension preferences, so that when a profile loads it always gets the most up-to-date list of voices. Partially covered by the existing TtsApiTest.UpdateVoicesApi test, and adds a new 2-part test to cover the caching in particular. (This supercedes: http://crrev.com/c/1247023) Bug: 889591 Change-Id: I79d8e576114951869af66e682920672924f247a7 Reviewed-on: https://chromium-review.googlesource.com/c/1263035 Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Reviewed-by:Devlin <rdevlin.cronin@chromium.org> Reviewed-by:
Katie Dektar <katie@chromium.org> Cr-Commit-Position: refs/heads/master@{#601848}
Showing
Please register or sign in to comment