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

Issue 2400503002: [Translate] Integrate TranslateEventProto UMA logging into TranslateManager. (Closed)

Created:
4 years, 2 months ago by Roger McFarlane (Chromium)
Modified:
4 years, 1 month ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, asvitkine+watch_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Integrate TranslateEventProto UMA logging into TranslateManager. This CL integrates the TranslateEventProto into the TranaslateManager in order to report these events via UMA. BUG=634961, 653700 Committed: https://crrev.com/2847cf85bbbd9dcfc7f9bcc3b6add85d709155ce Cr-Commit-Position: refs/heads/master@{#432416}

Patch Set 1 : review candidate #

Total comments: 2

Patch Set 2 : rebase and plumb through to uma metrics provider #

Total comments: 4

Patch Set 3 : fix bad interaction with UMA macro magic #

Patch Set 4 : hamelphi@'s comments #

Total comments: 52

Patch Set 5 : use unique_ptr #

Total comments: 8

Patch Set 6 : change signature of ShowTranslateBubble #

Patch Set 7 : log bubble requested but not shown #

Patch Set 8 : fix trybots #

Patch Set 9 : moar ShowTranslateBubbleResult plumbing #

Total comments: 6

Patch Set 10 : plumb through to TranslateBubbleUiEvent UMA metric #

Total comments: 6

Patch Set 11 : nits #

Patch Set 12 : remove un-needed include #

Patch Set 13 : fix trybots #

Unified diffs Side-by-side diffs Delta from patch set Stats (+328 lines, -73 lines) Patch
M chrome/browser/translate/chrome_translate_client.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/translate/chrome_translate_client.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +48 lines, -11 lines 0 comments Download
M chrome/browser/translate/translate_manager_render_view_host_unittest.cc View 1 2 3 4 5 6 7 4 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +32 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_window.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +13 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 2 3 4 5 6 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/translate/translate_bubble_factory.h View 1 2 3 4 5 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/ui/translate/translate_bubble_factory.cc View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -14 lines 0 comments Download
M chrome/browser/ui/translate/translate_bubble_view_state_transition.h View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -6 lines 0 comments Download
M chrome/test/base/test_browser_window.h View 1 2 3 4 5 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/test/base/test_browser_window.cc View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M components/metrics/proto/translate_event.proto View 1 2 3 4 5 6 7 8 9 2 chunks +17 lines, -1 line 0 comments Download
M components/translate/core/browser/translate_manager.h View 1 2 3 4 5 chunks +20 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_manager.cc View 1 2 3 4 5 6 7 8 13 chunks +66 lines, -3 lines 0 comments Download
M components/translate/core/browser/translate_ranker.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_ranker.cc View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -8 lines 0 comments Download
M components/translate/core/browser/translate_ui_delegate.cc View 1 2 3 4 5 6 7 8 8 chunks +39 lines, -6 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 119 (90 generated)
hamelphi
https://codereview.chromium.org/2400503002/diff/40001/components/translate/core/browser/translate_manager.cc File components/translate/core/browser/translate_manager.cc (right): https://codereview.chromium.org/2400503002/diff/40001/components/translate/core/browser/translate_manager.cc#newcode369 components/translate/core/browser/translate_manager.cc:369: translate_event_.set_target_language(target_lang); Why not call InitTranslateEvent here?
4 years, 2 months ago (2016-10-07 21:41:26 UTC) #7
Roger McFarlane (Chromium)
Thanks. +groby@ https://codereview.chromium.org/2400503002/diff/40001/components/translate/core/browser/translate_manager.cc File components/translate/core/browser/translate_manager.cc (right): https://codereview.chromium.org/2400503002/diff/40001/components/translate/core/browser/translate_manager.cc#newcode369 components/translate/core/browser/translate_manager.cc:369: translate_event_.set_target_language(target_lang); On 2016/10/07 21:41:26, hamelphi wrote: > ...
4 years, 2 months ago (2016-10-13 07:45:44 UTC) #49
hamelphi
Is it possible to add LANGUAGE_DISABLED_BY_AUTO_BLACKLIST logging here: https://cs.chromium.org/chromium/src/chrome/browser/translate/chrome_translate_client.cc?rcl=1476342965&l=205 and also other 'leaks' mentioned in ...
4 years, 2 months ago (2016-10-13 15:13:56 UTC) #54
Roger McFarlane (Chromium)
Thanks. Another look? Added and captured new event types for heuristic and window-state-based suppressions of ...
4 years, 2 months ago (2016-10-13 19:30:17 UTC) #62
groby-ooo-7-16
On 2016/10/13 19:30:17, Roger McFarlane (Chromium) wrote: > Thanks. Another look? > > Added and ...
4 years, 2 months ago (2016-10-13 20:09:14 UTC) #63
hamelphi
lgtm https://codereview.chromium.org/2400503002/diff/220001/components/translate/core/browser/BUILD.gn File components/translate/core/browser/BUILD.gn (right): https://codereview.chromium.org/2400503002/diff/220001/components/translate/core/browser/BUILD.gn#newcode71 components/translate/core/browser/BUILD.gn:71: "//components/metrics/proto", On 2016/10/13 19:30:16, Roger McFarlane (Chromium) wrote: ...
4 years, 2 months ago (2016-10-13 20:47:03 UTC) #66
Roger McFarlane (Chromium)
Thanks! Another look? +sky +rkaplow https://codereview.chromium.org/2400503002/diff/220001/components/translate/core/browser/BUILD.gn File components/translate/core/browser/BUILD.gn (right): https://codereview.chromium.org/2400503002/diff/220001/components/translate/core/browser/BUILD.gn#newcode71 components/translate/core/browser/BUILD.gn:71: "//components/metrics/proto", On 2016/10/13 20:47:02, ...
4 years, 2 months ago (2016-10-14 19:59:05 UTC) #71
Roger McFarlane (Chromium)
+sky +rkaplow for realz this time
4 years, 2 months ago (2016-10-14 20:00:05 UTC) #73
sky
https://codereview.chromium.org/2400503002/diff/300001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2400503002/diff/300001/chrome/browser/ui/views/frame/browser_view.cc#newcode1262 chrome/browser/ui/views/frame/browser_view.cc:1262: ChromeTranslateClient* translate_client = Can this code move to browser_commands ...
4 years, 2 months ago (2016-10-14 23:26:59 UTC) #74
rkaplow
https://codereview.chromium.org/2400503002/diff/300001/components/metrics/proto/translate_event.proto File components/metrics/proto/translate_event.proto (right): https://codereview.chromium.org/2400503002/diff/300001/components/metrics/proto/translate_event.proto#newcode123 components/metrics/proto/translate_event.proto:123: // The focus in on an editable field. not ...
4 years, 2 months ago (2016-10-17 14:48:20 UTC) #75
hamelphi
https://codereview.chromium.org/2400503002/diff/300001/components/metrics/proto/translate_event.proto File components/metrics/proto/translate_event.proto (right): https://codereview.chromium.org/2400503002/diff/300001/components/metrics/proto/translate_event.proto#newcode117 components/metrics/proto/translate_event.proto:117: // The web context for the translate is no ...
4 years, 2 months ago (2016-10-17 16:14:40 UTC) #76
Roger McFarlane (Chromium)
Thanks. Another look? https://codereview.chromium.org/2400503002/diff/300001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2400503002/diff/300001/chrome/browser/ui/views/frame/browser_view.cc#newcode1262 chrome/browser/ui/views/frame/browser_view.cc:1262: ChromeTranslateClient* translate_client = On 2016/10/14 23:26:59, ...
4 years, 1 month ago (2016-10-24 19:01:52 UTC) #77
sky
https://codereview.chromium.org/2400503002/diff/300001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2400503002/diff/300001/chrome/browser/ui/views/frame/browser_view.cc#newcode1262 chrome/browser/ui/views/frame/browser_view.cc:1262: ChromeTranslateClient* translate_client = On 2016/10/24 19:01:52, Roger McFarlane (Chromium) ...
4 years, 1 month ago (2016-10-24 20:45:00 UTC) #82
rkaplow
lgtm histogram lg, didn't review the rest
4 years, 1 month ago (2016-10-25 15:45:23 UTC) #87
Roger McFarlane (Chromium)
On 2016/10/24 20:45:00, sky wrote: > https://codereview.chromium.org/2400503002/diff/300001/chrome/browser/ui/views/frame/browser_view.cc > File chrome/browser/ui/views/frame/browser_view.cc (right): > > https://codereview.chromium.org/2400503002/diff/300001/chrome/browser/ui/views/frame/browser_view.cc#newcode1262 > ...
4 years, 1 month ago (2016-10-25 18:49:59 UTC) #88
groby-ooo-7-16
Ugh. It seems I had a whole bunch of messages sitting in my drafts. I'll ...
4 years, 1 month ago (2016-10-25 18:53:11 UTC) #89
sky
On 2016/10/25 18:49:59, Roger McFarlane (Chromium) wrote: > On 2016/10/24 20:45:00, sky wrote: > > ...
4 years, 1 month ago (2016-10-25 19:49:08 UTC) #90
Roger McFarlane (Chromium)
Thanks! Lots of great discussion! I had some questions/comments before I push up a new ...
4 years, 1 month ago (2016-10-25 20:07:56 UTC) #91
groby-ooo-7-16
Hopefully answered the questions. A lot more design feedback (what could go where etc), please ...
4 years, 1 month ago (2016-10-25 23:17:21 UTC) #92
Roger McFarlane (Chromium)
Sorry for the long delay. :( I've plumbed the ShowTranslateBubbleResult up and applied most of ...
4 years, 1 month ago (2016-11-07 20:51:58 UTC) #95
Roger McFarlane (Chromium)
groby@ and sky@: Anything else that needs to go into this CL before I can ...
4 years, 1 month ago (2016-11-11 15:55:55 UTC) #99
sky
https://codereview.chromium.org/2400503002/diff/400001/chrome/browser/ui/browser_commands.cc File chrome/browser/ui/browser_commands.cc (right): https://codereview.chromium.org/2400503002/diff/400001/chrome/browser/ui/browser_commands.cc#newcode833 chrome/browser/ui/browser_commands.cc:833: if (result != ShowTranslateBubbleResult::SUCCESS) { no {} https://codereview.chromium.org/2400503002/diff/400001/chrome/browser/ui/browser_commands.cc#newcode834 chrome/browser/ui/browser_commands.cc:834: ...
4 years, 1 month ago (2016-11-11 19:07:40 UTC) #100
Roger McFarlane (Chromium)
Thanks. Another look? https://codereview.chromium.org/2400503002/diff/400001/chrome/browser/ui/browser_commands.cc File chrome/browser/ui/browser_commands.cc (right): https://codereview.chromium.org/2400503002/diff/400001/chrome/browser/ui/browser_commands.cc#newcode833 chrome/browser/ui/browser_commands.cc:833: if (result != ShowTranslateBubbleResult::SUCCESS) { On ...
4 years, 1 month ago (2016-11-11 19:55:09 UTC) #103
sky
LGTM
4 years, 1 month ago (2016-11-11 21:17:45 UTC) #104
groby-ooo-7-16
LGTM modula a comment nit. There's also some angsting over mapping enums, but either decision ...
4 years, 1 month ago (2016-11-15 01:15:44 UTC) #105
Roger McFarlane (Chromium)
Thanks. https://codereview.chromium.org/2400503002/diff/440001/chrome/browser/translate/chrome_translate_client.cc File chrome/browser/translate/chrome_translate_client.cc (right): https://codereview.chromium.org/2400503002/diff/440001/chrome/browser/translate/chrome_translate_client.cc#newcode221 chrome/browser/translate/chrome_translate_client.cc:221: case ShowTranslateBubbleResult::BROWSER_WINDOW_NOT_VALID: On 2016/11/15 01:15:43, groby wrote: > ...
4 years, 1 month ago (2016-11-16 05:51:31 UTC) #108
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/2400503002/500001
4 years, 1 month ago (2016-11-16 07:09:59 UTC) #115
commit-bot: I haz the power
Committed patchset #13 (id:500001)
4 years, 1 month ago (2016-11-16 07:17:35 UTC) #117
commit-bot: I haz the power
4 years, 1 month ago (2016-11-16 07:22:14 UTC) #119
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/2847cf85bbbd9dcfc7f9bcc3b6add85d709155ce
Cr-Commit-Position: refs/heads/master@{#432416}

Powered by Google App Engine
This is Rietveld 408576698