Commit 2bfa23eb authored by Donn Denman's avatar Donn Denman Committed by Commit Bot

[TTS] Enable the CSTranslationModel for testing.

Enables the ContextualSearchTranslationModel Chrome Feature for
testing.  This feature is currently used to switch from the
custom Contextual Search translation logic and the Chrome
Translation Model.  This might have an impact on testing
or stability.

Also fix a logic error which switching between translation
models -- the disable switch should be considered.

TBR=twellington

BUG=644909

Change-Id: Ia155461999d983d952e1ce4c1c1c422a3cd89da0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1763298
Commit-Queue: Donn Denman <donnd@chromium.org>
Auto-Submit: Donn Denman <donnd@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689200}
parent c1daa44f
......@@ -40,7 +40,7 @@ public class ContextualSearchTranslateController implements ContextualSearchTran
*/
static public ContextualSearchTranslation getContextualSearchTranslation(
ContextualSearchPolicy policy, ContextualSearchTranslateInterface hostInterface) {
if (useChromeLanguageModel()) {
if (useChromeLanguageModel() && !policy.isTranslationDisabled()) {
return new ContextualSearchTranslationImpl(policy);
} else {
return new ContextualSearchTranslateController(policy, hostInterface);
......
......@@ -1654,6 +1654,21 @@
]
}
],
"ContextualSearchTranslation": [
{
"platforms": [
"android"
],
"experiments": [
{
"name": "ContextualSearchTranslationModel",
"enable_features": [
"ContextualSearchTranslationModel"
]
}
]
}
],
"CopylessPaste": [
{
"platforms": [
......
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