Commit 257151ca authored by Katie D's avatar Katie D Committed by Commit Bot

Don't create a TTS platform impl if none exists on VoicesChanged.

This fixes a regression where the platform impl was created even
when it wasn't yet needed.

Bug: 911184
Change-Id: I6555a81ff86327fd12994bf4de5e44074dfeee15
Reviewed-on: https://chromium-review.googlesource.com/c/1358919Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613207}
parent 7c4d25d6
......@@ -546,7 +546,7 @@ const PrefService* TtsControllerDelegateImpl::GetPrefService(
void TtsControllerDelegateImpl::VoicesChanged() {
// Existence of platform tts indicates explicit requests to tts. Since
// |VoicesChanged| can occur implicitly, only send if needed.
if (!GetTtsPlatform())
if (!tts_platform_)
return;
for (auto& delegate : voices_changed_delegates_)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment