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

Issue 1632953002: Change the TranslateDeclined() to only count decline if the explicit_closed is set to true (Closed)

Created:
4 years, 11 months ago by ftang
Modified:
4 years, 7 months ago
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix the problem that currently chrome count user action which not explicit decline translation as decline and only count those explicit action. The following actions will not be counted as a decline action after this fix. a. User open a new tab/window before confirm the translation b. User switch to a new tab/window to load page before confirm the translation BUG=575023 Committed: https://crrev.com/54d1294f337c5d7fe0bc474e9ae34d38913dc1f3 Cr-Commit-Position: refs/heads/master@{#376016}

Patch Set 1 #

Total comments: 2

Patch Set 2 : move the fix to translate_ui_delegate.cc instead #

Patch Set 3 : add unit test for TranslateUIDelegate::TranslateDeclined() function #

Patch Set 4 : fix ios/macos unit test breakage #

Patch Set 5 : fix ng build breakage #

Total comments: 37

Patch Set 6 : address review comment #

Patch Set 7 : refactor out MockTranslteDriver to .h file #

Patch Set 8 : Make MacOS compiled by split the MockTranslateDriver implementation into .cc file #

Patch Set 9 : rebase #

Patch Set 10 : fix gn build breakage for unittests #

Patch Set 11 : fix mac unit test breakage #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+309 lines, -71 lines) Patch
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M components/translate/core/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 1 comment Download
M components/translate/core/browser/language_state_unittest.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -67 lines 0 comments Download
A components/translate/core/browser/mock_translate_driver.h View 1 2 3 4 5 6 7 1 chunk +73 lines, -0 lines 0 comments Download
A components/translate/core/browser/mock_translate_driver.cc View 1 2 3 4 5 6 7 1 chunk +60 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_infobar_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M components/translate/core/browser/translate_ui_delegate.h View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_ui_delegate.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
A components/translate/core/browser/translate_ui_delegate_unittest.cc View 1 2 3 4 5 6 7 1 chunk +151 lines, -0 lines 0 comments Download

Messages

Total messages: 57 (18 generated)
groby-ooo-7-16
Also: * Please add a test case * have you tested the behavior on OSX? ...
4 years, 11 months ago (2016-01-26 01:07:22 UTC) #2
chromium-reviews
Please point out how to add test case OSX does not use TranslateBubbleView yet, right? ...
4 years, 11 months ago (2016-01-26 01:09:11 UTC) #3
ftang
Do you want me to extend chrome/browser/ui/views/translate/translate_bubble_view_unittest.cc ? On 25 January 2016 at 17:09, Frank ...
4 years, 11 months ago (2016-01-26 01:16:35 UTC) #4
groby-ooo-7-16
On 2016/01/26 01:16:35, ftang wrote: > Do you want me to extend > chrome/browser/ui/views/translate/translate_bubble_view_unittest.cc > ...
4 years, 11 months ago (2016-01-26 01:19:35 UTC) #5
ftang
There is already a chromium/src/chrome/browser/ui/views/translate/translate_bubble_view_browsertest.cc in the tree. Do you want me to extend that ...
4 years, 11 months ago (2016-01-26 01:30:35 UTC) #6
groby-ooo-7-16
Yes, that's what I meant - sorry for being unclear. As for page navigation/TranslationDeclined - ...
4 years, 11 months ago (2016-01-26 01:47:12 UTC) #7
chromium-reviews
Currently, the code inside TranslationDeclined will change the metrics Translate.DeclineTranslateDismissUI If it is not trigger ...
4 years, 11 months ago (2016-01-26 01:55:52 UTC) #8
groby-ooo-7-16
"Dismiss UI" means the UI has been closed for any reason that was not initiated ...
4 years, 11 months ago (2016-01-26 02:05:45 UTC) #9
chromium-reviews
That is another way to solve it. The problem is really the name TranslationDeclined() imply ...
4 years, 11 months ago (2016-01-26 18:23:37 UTC) #10
groby-ooo-7-16
SGTM On Tue, Jan 26, 2016 at 10:23 AM, Frank Tang (譚永鋒) <ftang@google.com> wrote: > ...
4 years, 11 months ago (2016-01-26 19:08:58 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1632953002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1632953002/20001
4 years, 11 months ago (2016-01-26 20:49:56 UTC) #13
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even ...
4 years, 11 months ago (2016-01-26 20:49:58 UTC) #15
chromium-reviews
I add unit test and it now passed both gyp and ng build PTAL Is ...
4 years, 10 months ago (2016-01-28 15:49:04 UTC) #17
groby-ooo-7-16
https://codereview.chromium.org/1632953002/diff/80001/components/translate/core/browser/translate_ui_delegate.cc File components/translate/core/browser/translate_ui_delegate.cc (left): https://codereview.chromium.org/1632953002/diff/80001/components/translate/core/browser/translate_ui_delegate.cc#oldcode225 components/translate/core/browser/translate_ui_delegate.cc:225: if (!translate_driver_->IsOffTheRecord()) { Overall, I'd prefer it if you'd ...
4 years, 10 months ago (2016-01-28 21:17:29 UTC) #18
ftang
thanks for your comment. I will work on it. https://codereview.chromium.org/1632953002/diff/80001/components/translate/core/browser/translate_ui_delegate.cc File components/translate/core/browser/translate_ui_delegate.cc (left): https://codereview.chromium.org/1632953002/diff/80001/components/translate/core/browser/translate_ui_delegate.cc#oldcode225 components/translate/core/browser/translate_ui_delegate.cc:225: ...
4 years, 10 months ago (2016-01-28 22:37:22 UTC) #19
ftang
address review comment
4 years, 10 months ago (2016-01-29 20:04:56 UTC) #20
ftang
groby- please advise if I factoring out the mock class where should I place it. ...
4 years, 10 months ago (2016-01-29 20:08:10 UTC) #21
groby-ooo-7-16
Ah, sorry - that was stuck in the draft stage. https://codereview.chromium.org/1632953002/diff/80001/components/translate/core/browser/translate_ui_delegate_unittest.cc File components/translate/core/browser/translate_ui_delegate_unittest.cc (right): https://codereview.chromium.org/1632953002/diff/80001/components/translate/core/browser/translate_ui_delegate_unittest.cc#newcode28 ...
4 years, 10 months ago (2016-01-29 20:09:17 UTC) #22
ftang
refactor out MockTranslteDriver to .h file
4 years, 10 months ago (2016-01-29 22:47:19 UTC) #23
ftang
groby PTAL https://codereview.chromium.org/1632953002/diff/80001/components/translate/core/browser/translate_ui_delegate_unittest.cc File components/translate/core/browser/translate_ui_delegate_unittest.cc (right): https://codereview.chromium.org/1632953002/diff/80001/components/translate/core/browser/translate_ui_delegate_unittest.cc#newcode49 components/translate/core/browser/translate_ui_delegate_unittest.cc:49: MOCK_METHOD0(GetTranslatePrefsMock, TranslatePrefs*()); On 2016/01/29 20:09:16, groby wrote: ...
4 years, 10 months ago (2016-02-02 00:37:51 UTC) #24
ftang
Make MacOS compiled by split the MockTranslateDriver implementation into .cc file
4 years, 10 months ago (2016-02-02 23:46:40 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1632953002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1632953002/140001
4 years, 10 months ago (2016-02-08 22:24:35 UTC) #27
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even ...
4 years, 10 months ago (2016-02-08 22:24:37 UTC) #29
ftang
PTAL
4 years, 10 months ago (2016-02-10 19:23:11 UTC) #30
groby-ooo-7-16
lgtm
4 years, 10 months ago (2016-02-10 19:32:44 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1632953002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1632953002/180001
4 years, 10 months ago (2016-02-10 19:38:18 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1632953002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1632953002/180001
4 years, 10 months ago (2016-02-10 19:41:59 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/144836)
4 years, 10 months ago (2016-02-10 19:54:19 UTC) #38
ftang
hajimehoshi- I need your review since you are in the OWNERS file but not groby.
4 years, 10 months ago (2016-02-10 19:58:17 UTC) #40
hajimehoshi
Sorry for the delayed review. lgtm
4 years, 10 months ago (2016-02-12 15:15:44 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1632953002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1632953002/180001
4 years, 10 months ago (2016-02-12 18:52:46 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/179673)
4 years, 10 months ago (2016-02-12 20:31:11 UTC) #45
ftang
fix mac unit test breakage
4 years, 10 months ago (2016-02-17 20:14:54 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1632953002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1632953002/200001
4 years, 10 months ago (2016-02-17 22:43:17 UTC) #49
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 10 months ago (2016-02-17 22:54:15 UTC) #51
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/54d1294f337c5d7fe0bc474e9ae34d38913dc1f3 Cr-Commit-Position: refs/heads/master@{#376016}
4 years, 10 months ago (2016-02-17 22:56:16 UTC) #53
Nico
https://codereview.chromium.org/1632953002/diff/200001/components/translate/core/browser/BUILD.gn File components/translate/core/browser/BUILD.gn (right): https://codereview.chromium.org/1632953002/diff/200001/components/translate/core/browser/BUILD.gn#newcode96 components/translate/core/browser/BUILD.gn:96: sources += [ "translate_ui_delegate_unittest.cc" ] This file is built ...
4 years, 7 months ago (2016-05-18 13:19:23 UTC) #55
brucedawson
Ping! We need to know whether the discrepancy between the gyp and gn builds is ...
4 years, 7 months ago (2016-05-20 18:49:38 UTC) #56
ftang
4 years, 7 months ago (2016-05-20 19:55:17 UTC) #57
Message was sent while issue was closed.
On 2016/05/20 18:49:38, brucedawson wrote:
> Ping! We need to know whether the discrepancy between the gyp and gn builds is
> intentional or not, in order to see whether having
> translate_ui_delegate_unittest.cc missing from most gn builds is normal and
> expected or a bug.

see https://codereview.chromium.org/1987073003/

Powered by Google App Engine
This is Rietveld 408576698