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

Issue 2697703004: Allow TranslateRanker to override decisions taken by heuristics. (Closed)

Created:
3 years, 10 months ago by hamelphi
Modified:
3 years, 8 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org, Roger McFarlane (Chromium)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow TranslateRanker to override decisions taken by heuristics. BUG=646711 Review-Url: https://codereview.chromium.org/2697703004 Cr-Commit-Position: refs/heads/master@{#466143} Committed: https://chromium.googlesource.com/chromium/src/+/f662e8cd2f8358dff843dd6e803f5d9f68d55774

Patch Set 1 #

Patch Set 2 : Nit. #

Total comments: 2

Patch Set 3 : Add unittests. #

Patch Set 4 : Remove unused include. #

Total comments: 1

Patch Set 5 : Rebase #

Patch Set 6 : Add mock for TranslateAcceptLanguage & clang format. #

Patch Set 7 : Load model if decision override is enabled. #

Patch Set 8 : Make TranslateAcceptLanguages default constructor protected. #

Total comments: 11

Patch Set 9 : Move most of the ShouldOfferTranslation logic to TranslateRanker. Move Bubble Suppression Logic fro… #

Patch Set 10 : Unittest for ShouldSuppressBubbleUI. #

Patch Set 11 : Move more logic from manager to ranker. #

Patch Set 12 : Move Ranker Query a bit earlier. #

Patch Set 13 : nit. #

Patch Set 14 : Unittests for RecordTranslateEvent and ShouldOverrideDecision. Cleanup of experiment accessors. Mov… #

Patch Set 15 : Nits. #

Patch Set 16 : Change GetModelVersion return type to uint32_t. #

Patch Set 17 : Merge & Cleanup commented code. #

Total comments: 4

Patch Set 18 : Make ShouldSuppressBubbleUI easier to read. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+509 lines, -248 lines) Patch
M chrome/browser/translate/chrome_translate_client.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -18 lines 1 comment Download
M components/metrics/proto/translate_event.proto View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M components/translate/core/browser/mock_translate_ranker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +19 lines, -9 lines 0 comments Download
M components/translate/core/browser/mock_translate_ranker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -20 lines 0 comments Download
M components/translate/core/browser/translate_manager.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 12 chunks +58 lines, -52 lines 0 comments Download
M components/translate/core/browser/translate_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 11 chunks +158 lines, -16 lines 0 comments Download
M components/translate/core/browser/translate_ranker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +26 lines, -19 lines 0 comments Download
M components/translate/core/browser/translate_ranker_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +25 lines, -9 lines 0 comments Download
M components/translate/core/browser/translate_ranker_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +60 lines, -16 lines 0 comments Download
M components/translate/core/browser/translate_ranker_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +141 lines, -88 lines 0 comments Download

Messages

Total messages: 45 (26 generated)
hamelphi
3 years, 10 months ago (2017-02-15 00:31:11 UTC) #2
hamelphi
3 years, 9 months ago (2017-02-23 16:20:16 UTC) #4
groby-ooo-7-16
May I have some test, please? :) https://codereview.chromium.org/2697703004/diff/20001/chrome/browser/translate/chrome_translate_client.cc File chrome/browser/translate/chrome_translate_client.cc (right): https://codereview.chromium.org/2697703004/diff/20001/chrome/browser/translate/chrome_translate_client.cc#newcode241 chrome/browser/translate/chrome_translate_client.cc:241: if (translate::TranslateRanker::IsDecisionOverrideEnabled()) ...
3 years, 9 months ago (2017-02-23 19:08:06 UTC) #5
hamelphi
Added several unittests and merged with changes from Roger's translate_ranker refactor CL. https://codereview.chromium.org/2697703004/diff/20001/chrome/browser/translate/chrome_translate_client.cc File chrome/browser/translate/chrome_translate_client.cc ...
3 years, 9 months ago (2017-03-01 00:40:03 UTC) #6
hamelphi
3 years, 9 months ago (2017-03-01 00:40:43 UTC) #8
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/2697703004/diff/60001/components/translate/core/browser/translate_ranker_impl.cc File components/translate/core/browser/translate_ranker_impl.cc (right): https://codereview.chromium.org/2697703004/diff/60001/components/translate/core/browser/translate_ranker_impl.cc#newcode194 components/translate/core/browser/translate_ranker_impl.cc:194: translate::kTranslateRankerDecisionOverride); Nit: Remove translate:: since it's already in ...
3 years, 9 months ago (2017-03-06 22:08:20 UTC) #15
groby-ooo-7-16
lgtm
3 years, 9 months ago (2017-03-08 00:45:33 UTC) #16
hamelphi
groby@ PTAL I merged with the latest changes, and had to mock TranslateAcceptLanguages for the ...
3 years, 8 months ago (2017-04-07 20:54:37 UTC) #17
groby-ooo-7-16
I'd _prefer_ if you'd unify the testing code first, unless this is "MUST LAND FOR ...
3 years, 8 months ago (2017-04-10 20:52:47 UTC) #18
hamelphi
https://codereview.chromium.org/2697703004/diff/140001/chrome/browser/translate/chrome_translate_client.cc File chrome/browser/translate/chrome_translate_client.cc (right): https://codereview.chromium.org/2697703004/diff/140001/chrome/browser/translate/chrome_translate_client.cc#newcode228 chrome/browser/translate/chrome_translate_client.cc:228: if (!base::FeatureList::IsEnabled(translate::kTranslateUI2016Q2) && On 2017/04/10 20:52:47, groby wrote: > ...
3 years, 8 months ago (2017-04-11 22:46:07 UTC) #19
hamelphi
On 2017/04/11 22:46:07, hamelphi wrote: > https://codereview.chromium.org/2697703004/diff/140001/chrome/browser/translate/chrome_translate_client.cc > File chrome/browser/translate/chrome_translate_client.cc (right): > > https://codereview.chromium.org/2697703004/diff/140001/chrome/browser/translate/chrome_translate_client.cc#newcode228 > ...
3 years, 8 months ago (2017-04-11 22:46:18 UTC) #20
hamelphi
I moved more logic to Ranker. TODO: unittest for TranslateRanker::RecordTranslateEvent and TranslateRanker::ShouldOverrideDecision. https://codereview.chromium.org/2697703004/diff/140001/chrome/browser/translate/chrome_translate_client.cc File chrome/browser/translate/chrome_translate_client.cc ...
3 years, 8 months ago (2017-04-12 21:10:53 UTC) #21
hamelphi
Uploaded the last unittests. Ready for review. groby@, PTAL Adding rogerm@ as reviewer since I ...
3 years, 8 months ago (2017-04-12 22:28:56 UTC) #23
Roger McFarlane (Chromium)
lgtm Nice! https://codereview.chromium.org/2697703004/diff/310001/components/translate/core/browser/translate_manager.cc File components/translate/core/browser/translate_manager.cc (right): https://codereview.chromium.org/2697703004/diff/310001/components/translate/core/browser/translate_manager.cc#newcode610 components/translate/core/browser/translate_manager.cc:610: LANGUAGE_DISABLED_BY_AUTO_BLACKLIST))); nit: I'd rather see this as ...
3 years, 8 months ago (2017-04-19 16:16:16 UTC) #36
hamelphi
Thanks Roger. groby@ PTAL. https://codereview.chromium.org/2697703004/diff/310001/components/translate/core/browser/translate_manager.cc File components/translate/core/browser/translate_manager.cc (right): https://codereview.chromium.org/2697703004/diff/310001/components/translate/core/browser/translate_manager.cc#newcode610 components/translate/core/browser/translate_manager.cc:610: LANGUAGE_DISABLED_BY_AUTO_BLACKLIST))); On 2017/04/19 16:16:16, Roger ...
3 years, 8 months ago (2017-04-19 18:19:48 UTC) #37
groby-ooo-7-16
lgtm https://codereview.chromium.org/2697703004/diff/140001/components/translate/core/browser/translate_accept_languages.h File components/translate/core/browser/translate_accept_languages.h (right): https://codereview.chromium.org/2697703004/diff/140001/components/translate/core/browser/translate_accept_languages.h#newcode39 components/translate/core/browser/translate_accept_languages.h:39: TranslateAcceptLanguages(); On 2017/04/12 21:10:53, hamelphi wrote: > On ...
3 years, 8 months ago (2017-04-20 19:45:57 UTC) #38
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/2697703004/330001
3 years, 8 months ago (2017-04-20 19:58:21 UTC) #41
hamelphi
On 2017/04/20 19:45:57, groby wrote: > lgtm > > https://codereview.chromium.org/2697703004/diff/140001/components/translate/core/browser/translate_accept_languages.h > File components/translate/core/browser/translate_accept_languages.h (right): > ...
3 years, 8 months ago (2017-04-20 20:46:53 UTC) #42
commit-bot: I haz the power
3 years, 8 months ago (2017-04-20 21:30:03 UTC) #45
Message was sent while issue was closed.
Committed patchset #18 (id:330001) as
https://chromium.googlesource.com/chromium/src/+/f662e8cd2f8358dff843dd6e803f...

Powered by Google App Engine
This is Rietveld 408576698