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

Issue 2920953002: Auto-always/never can at most triggered twice (new translate infobar) (Closed)

Created:
3 years, 6 months ago by Marti Wong
Modified:
3 years, 6 months ago
Reviewers:
mdjones, groby-ooo-7-16
CC:
chromium-reviews, Leo
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Auto-always/never can at most triggered twice (new translate infobar) Currently, in the new translate infobar, "Always translate" will be triggered automatically when a language is consecutively translated for 5 times. And user can click on "Cancel" to undo the "Always translate". However, it is quite annoying that the auto-always will keep triggering again and again for every 5 translations. After discussion, we should limit the maximum number of auto-always to 2 times. Same for auto-never. BUG=728931 Review-Url: https://codereview.chromium.org/2920953002 Cr-Commit-Position: refs/heads/master@{#479226} Committed: https://chromium.googlesource.com/chromium/src/+/fb6d187db2e842f01db923c87d7958b52175c37f

Patch Set 1 : #

Total comments: 10

Patch Set 2 : add '#if define' #

Total comments: 4

Patch Set 3 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -2 lines) Patch
M chrome/browser/ui/android/infobars/translate_compact_infobar.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/android/infobars/translate_compact_infobar.cc View 1 2 3 chunks +27 lines, -2 lines 0 comments Download
M components/translate/core/browser/translate_infobar_delegate.h View 1 1 chunk +11 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_infobar_delegate.cc View 1 1 chunk +26 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_prefs.h View 1 2 chunks +18 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_prefs.cc View 1 2 4 chunks +67 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (20 generated)
Marti Wong
Hi Rachel, PTAL. Thank you~! https://codereview.chromium.org/2920953002/diff/60001/chrome/browser/ui/android/infobars/translate_compact_infobar.cc File chrome/browser/ui/android/infobars/translate_compact_infobar.cc (right): https://codereview.chromium.org/2920953002/diff/60001/chrome/browser/ui/android/infobars/translate_compact_infobar.cc#newcode174 chrome/browser/ui/android/infobars/translate_compact_infobar.cc:174: bool return_value = (delegate->GetTranslationDeniedCount() ...
3 years, 6 months ago (2017-06-02 07:37:13 UTC) #6
groby-ooo-7-16
Before you land this: I like this. I think this makes sense beyond Android. You ...
3 years, 6 months ago (2017-06-07 17:02:50 UTC) #7
Marti Wong
On 2017/06/07 17:02:50, groby wrote: > Before you land this: I like this. I think ...
3 years, 6 months ago (2017-06-08 04:25:57 UTC) #8
Marti Wong
Hi Matthew, PTAL: translate_compact_infobar.h/.cc Thanks~! https://codereview.chromium.org/2920953002/diff/60001/components/translate/core/browser/translate_prefs.cc File components/translate/core/browser/translate_prefs.cc (right): https://codereview.chromium.org/2920953002/diff/60001/components/translate/core/browser/translate_prefs.cc#newcode196 components/translate/core/browser/translate_prefs.cc:196: ResetTranslationAutoAlwaysCount(language); On 2017/06/07 17:02:49, ...
3 years, 6 months ago (2017-06-09 03:28:26 UTC) #13
mdjones
https://codereview.chromium.org/2920953002/diff/80001/chrome/browser/ui/android/infobars/translate_compact_infobar.cc File chrome/browser/ui/android/infobars/translate_compact_infobar.cc (right): https://codereview.chromium.org/2920953002/diff/80001/chrome/browser/ui/android/infobars/translate_compact_infobar.cc#newcode172 chrome/browser/ui/android/infobars/translate_compact_infobar.cc:172: int off_by_one = auto_never_count == 0 ? 1 : ...
3 years, 6 months ago (2017-06-09 17:43:37 UTC) #14
Marti Wong
Thx. See if it's okay. https://codereview.chromium.org/2920953002/diff/80001/chrome/browser/ui/android/infobars/translate_compact_infobar.cc File chrome/browser/ui/android/infobars/translate_compact_infobar.cc (right): https://codereview.chromium.org/2920953002/diff/80001/chrome/browser/ui/android/infobars/translate_compact_infobar.cc#newcode172 chrome/browser/ui/android/infobars/translate_compact_infobar.cc:172: int off_by_one = auto_never_count ...
3 years, 6 months ago (2017-06-13 06:28:40 UTC) #22
mdjones
lgtm
3 years, 6 months ago (2017-06-13 15:38:30 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2920953002/120001
3 years, 6 months ago (2017-06-13 23:55:41 UTC) #26
commit-bot: I haz the power
3 years, 6 months ago (2017-06-14 00:28:16 UTC) #29
Message was sent while issue was closed.
Committed patchset #3 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/fb6d187db2e842f01db923c87d79...

Powered by Google App Engine
This is Rietveld 408576698