Suppress Translate Prompts when in Airplane Mode |
||||
Issue descriptionAssist features (like translate) shouldn't prompt when we know the device is offline. I noticed this while testing net errors - does the translate prompt show up because CLD2 looked at the URL/path? It's especially weird because the content area is in English and the translation won't work because I'm offline :/
,
May 19 2016
lol. sure thing: https://namu.wiki/w/나무위키:대문 I found it from the cookbook for them-color toolbars :)
,
May 19 2016
Huh. We get no entry in the detection logs whatsoever. That probably means old and ugly state is still running around.... This is further supported that it only happens if I navigate to the page with network on, and then again when it's off. If I start Chrome w/ network off, I do not get a translate prompt. That means likely this was an in-page navigation. Did you just refresh the URL, or did you navigate freshly?
,
May 19 2016
Also: The correct fix here is probably to check net::NetworkChangeNotifier::IsOffline in TranslateManager::InitiateTranslation and early-out when things are offline. I'd do that right at the top of InitiateTranslation, without recording any metrics - it's the equivalent of never requesting a translation.
,
May 19 2016
,
May 19 2016
re: #3 Yup. It was open in a tab, I turned on airplane mode, and then reloaded that tab.
,
May 30 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0e7f1247be559c523607aa1452dfd2a351b85173 commit 0e7f1247be559c523607aa1452dfd2a351b85173 Author: groby <groby@chromium.org> Date: Mon May 30 05:47:14 2016 [Translate] Don't try to translate when offline If the user reloads a page during a network outage, and language detection for this page has completed before, Chrome will currently offer to translate that page, even though this cannot possibly succeed when offline. This CL adds an early-out for any attempts to translate content while offline. TEST=Load https://namu.wiki/w/나무위키:대문 - then turn off network. Hit reload. Observe translate is not offered a second time. BUG= 612973 Review-Url: https://codereview.chromium.org/1997573002 Cr-Commit-Position: refs/heads/master@{#396683} [modify] https://crrev.com/0e7f1247be559c523607aa1452dfd2a351b85173/components/translate/core/browser/translate_manager.cc [modify] https://crrev.com/0e7f1247be559c523607aa1452dfd2a351b85173/components/translate/core/browser/translate_manager_unittest.cc
,
Sep 14 2016
,
Apr 27 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by groby@chromium.org
, May 19 2016