Reland "[WebLayer] Add ability to override translate target language"
This is an unchanged reland of 3481a5a7 . The test failure that caused this CL to be reverted (https://ci.chromium.org/p/chromium/builders/ci/android-pie-x86-rel/2212) looks like unrelated pre-existing flake; for example, this run from September 7 has the same failure: https://ci.chromium.org/p/chromium/builders/ci/android-pie-x86-rel/2123 . I will separately handle marking that test flaky. TBR=jam@chromium.org Original change's description: > [WebLayer] Add ability to override translate target language > > This CL adds the ability to override the target language used by the > translate feature on a per-Tab basis. This is analogous to the > functionality of CCT's TRANSLATE_LANGUAGE intent extra. Once the > override is set, all translate infobars in the given Tab will appear > with the specified language as the target language. Calling > Tab#setTranslateTargetLanguage() with an empty string clears the > override and causes behavior to revert to normal. > > Note that even with the override set the translate infobar will not > appear for pages that are in the user's locale. This is internal > behavior of Chromium's translate component and is common to CCT and > WebLayer. > > I marked the added method as since 86 as this CL will be targeted for > cherrypicking to 86. > > Bug: 1116394 > Change-Id: Ic4f08c16a64a3f0ceebed5feab7cdc9401001279 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2397716 > Reviewed-by: John Abd-El-Malek <jam@chromium.org> > Reviewed-by: Clark DuVall <cduvall@chromium.org> > Commit-Queue: Colin Blundell <blundell@chromium.org> > Cr-Commit-Position: refs/heads/master@{#806633} Bug: 1116394 Change-Id: If8d8058584a260171c83687c2dfcf6732a33846c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410478Reviewed-by:Colin Blundell <blundell@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#806966}
Showing
Please register or sign in to comment