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

Issue 2533953003: [translate] Fix enforcement vs logging for TranslateRanker. (Closed)

Created:
4 years ago by Roger McFarlane (Chromium)
Modified:
4 years ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[translate] Fix enforcement vs logging for TranslateRanker. The translate ranker enforcement flag was redundantly enforced within the ranker itself, thwarting the TranslateManagers attempts to log the ranker result and enforc (or not) the result. The check in the TranslateRanker should have been removed in the last refactor. BUG=669528 Committed: https://crrev.com/131e0dc96c8c88fc1fc222442a61fb2704b1795d Cr-Commit-Position: refs/heads/master@{#435061}

Patch Set 1 : remove enforcement check #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -3 lines) Patch
M components/translate/core/browser/translate_ranker.cc View 1 chunk +1 line, -3 lines 4 comments Download

Messages

Total messages: 30 (18 generated)
hamelphi
lgtm
4 years ago (2016-11-29 16:40:39 UTC) #10
Roger McFarlane (Chromium)
PTAL?
4 years ago (2016-11-29 18:03:48 UTC) #13
Roger McFarlane (Chromium)
https://codereview.chromium.org/2533953003/diff/20001/components/translate/core/browser/translate_ranker.cc File components/translate/core/browser/translate_ranker.cc (left): https://codereview.chromium.org/2533953003/diff/20001/components/translate/core/browser/translate_ranker.cc#oldcode185 components/translate/core/browser/translate_ranker.cc:185: return IsEnforcementEnabled() ? result : kDefaultResponse; The TranslateManager code ...
4 years ago (2016-11-29 18:43:30 UTC) #14
groby1
Based on the CL description, the behavior difference I called out in the remark is ...
4 years ago (2016-11-29 19:03:43 UTC) #16
hamelphi
lgtm https://codereview.chromium.org/2533953003/diff/20001/components/translate/core/browser/translate_ranker.cc File components/translate/core/browser/translate_ranker.cc (left): https://codereview.chromium.org/2533953003/diff/20001/components/translate/core/browser/translate_ranker.cc#oldcode185 components/translate/core/browser/translate_ranker.cc:185: return IsEnforcementEnabled() ? result : kDefaultResponse; On 2016/11/29 ...
4 years ago (2016-11-29 19:37:06 UTC) #18
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/2533953003/20001
4 years ago (2016-11-29 19:37:23 UTC) #19
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years ago (2016-11-29 19:37:25 UTC) #21
groby-ooo-7-16
On 2016/11/29 19:37:25, commit-bot: I haz the power wrote: > No L-G-T-M from a valid ...
4 years ago (2016-11-29 19:45:50 UTC) #22
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/2533953003/20001
4 years ago (2016-11-29 19:46:28 UTC) #24
commit-bot: I haz the power
Committed patchset #1 (id:20001)
4 years ago (2016-11-29 19:54:21 UTC) #27
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/131e0dc96c8c88fc1fc222442a61fb2704b1795d Cr-Commit-Position: refs/heads/master@{#435061}
4 years ago (2016-11-29 19:58:46 UTC) #29
Roger McFarlane (Chromium)
4 years ago (2016-11-29 20:01:00 UTC) #30
Message was sent while issue was closed.
https://codereview.chromium.org/2533953003/diff/20001/components/translate/co...
File components/translate/core/browser/translate_ranker.cc (left):

https://codereview.chromium.org/2533953003/diff/20001/components/translate/co...
components/translate/core/browser/translate_ranker.cc:185: return
IsEnforcementEnabled() ? result : kDefaultResponse;
On 2016/11/29 19:37:06, hamelphi wrote:
> On 2016/11/29 19:03:43, groby1 wrote:
> > On 2016/11/29 18:43:30, Roger McFarlane (Chromium) wrote:
> > > The TranslateManager code where this is enforced is at
> > >
> >
>
https://cs.chromium.org/chromium/src/components/translate/core/browser/transl...
> > 
> > The behavior in translate manager is subtly different, in that the ranker
> > response is always logged as the actual result, even when enforcement is
> > disabled. Intentionally, or bug?
> 
> It is intentional. We want to log the response the ranker would have given
even
> if we don't enforce it. See b/33176772.

Precisely.  :)

Powered by Google App Engine
This is Rietveld 408576698