Commit 41d92ee8 authored by Akihiro Ota's avatar Akihiro Ota Committed by Commit Bot

ChromeVox: Ensure language switching is off if feature flag is absent

This change ensures that ChromeVox language switching is turned off
if the feature flag is absent. This change is motivated by the
following scenario:

1. Run Chrome with language switching flag.
2. Turn on ChromeVox language switching.
3. Restart Chrome without language switching flag.
4. Language switching remains enabled because ChromeVox saves
preferences. Since feature flag is not present, there is no way
to turn language switching off.

Change-Id: I62dd741f0e6710282760b9eccdc75f371c917371
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713030Reviewed-by: default avatarKatie Dektar <katie@chromium.org>
Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680039}
parent ea9fbb9c
......@@ -168,6 +168,15 @@ cvox.ChromeVoxPrefs.prototype.init = function(pullFromLocalStorage) {
localStorage[pref] = cvox.ChromeVoxPrefs.DEFAULT_PREFS[pref];
}
}
// Since language switching is currently an experimental feature, ensure that
// it is off if the feature flag is absent.
chrome.commandLinePrivate.hasSwitch(
'enable-experimental-accessibility-chromevox-language-switching',
function(enabled) {
if (!enabled) {
localStorage['languageSwitching'] = false;
}
});
};
/**
......
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