Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Issue 1997573002: [Translate] Don't try to translate when offline (Closed)

Created:
4 years, 7 months ago by groby-ooo-7-16
Modified:
4 years, 6 months ago
Reviewers:
hajimehoshi
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[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 Committed: https://crrev.com/0e7f1247be559c523607aa1452dfd2a351b85173 Cr-Commit-Position: refs/heads/master@{#396683}

Patch Set 1 #

Patch Set 2 : Remove unneeded header. #

Patch Set 3 : Add Mock Translate Driver #

Patch Set 4 : Register translate.enabled pref #

Patch Set 5 : Force translate off for test. #

Total comments: 8

Patch Set 6 : Review fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -2 lines) Patch
M components/translate/core/browser/translate_manager.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_manager_unittest.cc View 1 2 3 4 5 4 chunks +134 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
groby-ooo-7-16
hajimehoshi@: PTAL
4 years, 7 months ago (2016-05-25 22:59:29 UTC) #3
hajimehoshi
Awesome! https://codereview.chromium.org/1997573002/diff/80001/components/translate/core/browser/translate_manager_unittest.cc File components/translate/core/browser/translate_manager_unittest.cc (right): https://codereview.chromium.org/1997573002/diff/80001/components/translate/core/browser/translate_manager_unittest.cc#newcode34 components/translate/core/browser/translate_manager_unittest.cc:34: // Override NetworkChangeNotifier to simulate connection type changes ...
4 years, 7 months ago (2016-05-26 06:46:59 UTC) #4
groby-ooo-7-16
https://codereview.chromium.org/1997573002/diff/80001/components/translate/core/browser/translate_manager_unittest.cc File components/translate/core/browser/translate_manager_unittest.cc (right): https://codereview.chromium.org/1997573002/diff/80001/components/translate/core/browser/translate_manager_unittest.cc#newcode34 components/translate/core/browser/translate_manager_unittest.cc:34: // Override NetworkChangeNotifier to simulate connection type changes for ...
4 years, 6 months ago (2016-05-28 00:59:37 UTC) #5
groby-ooo-7-16
4 years, 6 months ago (2016-05-28 01:06:26 UTC) #6
hajimehoshi
lgtm
4 years, 6 months ago (2016-05-30 04:41:28 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1997573002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1997573002/100001
4 years, 6 months ago (2016-05-30 04:41:41 UTC) #9
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 6 months ago (2016-05-30 05:47:26 UTC) #11
commit-bot: I haz the power
4 years, 6 months ago (2016-05-30 05:48:57 UTC) #13
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/0e7f1247be559c523607aa1452dfd2a351b85173
Cr-Commit-Position: refs/heads/master@{#396683}

Powered by Google App Engine
This is Rietveld 408576698