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

Issue 2261793002: Bring the feedback button to the Mac sad tab (Closed)

Created:
4 years, 4 months ago by Sidney San Martín
Modified:
4 years, 3 months ago
Reviewers:
James Cook, *Nico, *Ilya Sherman
CC:
chromium-reviews, tfarina, asvitkine+watch_chromium.org, Will Harris
Base URL:
https://chromium.googlesource.com/chromium/src@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Bring the feedback button to the Mac sad tab The Views implementation of SadTab supports two big things that were missing in the Mac implementation: 1. The reload button turns into a feedback button on repeated crashes. 2. Histograms for tracking different kinds of crashes. This moves that logic up into the base SadTab, so that both implementations can use it. It also adds new histograms to count when a sad tab with a reload button or feedback button is displayed, and clicks on the button or help link. Other changes: - HISTOGRAM_ENUMERATION_WITH_FLAG uses a new base::underlying_value() function to cast scoped enums to their underlying integral values. (Unlike classic enums, they don't implicitly convert). - The Show() and Close() methods of SadTab are gone. Show() was always called right after construction, and Close() was always called right before destruction, so I merged them with the ctor+dtor. - SadTabController is gone. - SadTabView no longer gets a reference to the WebContents; SadTabCocoa is now responsible for sizing it and adding it to the view hierarchy. - The help link text no longer selects when you right click it. BUG=623690 TEST=Trigger sad tabs on each platform either with chrome://crash or by killing processes in the task manager. Check that the first sad tab shows a reload button and subsequent sad tabs show a feedback button. Otherwise, the look and behavior of the sad tab should be the same. Committed: https://crrev.com/26cabf35396e65533b30062b89aee46cbf55b862 Cr-Commit-Position: refs/heads/master@{#417606}

Patch Set 1 : Patch Set 1 (Needs histogram descriptions) #

Patch Set 2 : Fix some Views build issues #

Patch Set 3 : Refactor to elide SadTabController, tidy SadTabView #

Patch Set 4 : Add real summaries for the new histograms #

Patch Set 5 : Tweak CL similarity threshold to get rid of some false renames. #

Patch Set 6 : CL cleanup #

Total comments: 12

Patch Set 7 : Make a cast which only takes enums and numbers, fix nits #

Total comments: 2

Patch Set 8 : underlying_number -> underlying_value for better error messages #

Total comments: 4

Patch Set 9 : Rebase, make switches exhaustive #

Patch Set 10 : clang considers this unreachable, but not gcc #

Patch Set 11 : Trybots caught this, but not the local presubmit check. Will investigate. #

Total comments: 7

Patch Set 12 : Ditch a commented-out ctor, CHECK(false) -> NOTREACHED(); return #

Patch Set 13 : Move this #undef back where it belongs. #

Patch Set 14 : Clean up some comments, replace DLOG_ASSERT with DCHECK, move an #include to the right spot. #

Total comments: 4

Patch Set 15 : Ditch a pointless |explicit|, add a comment on SadTabView ownership. #

Total comments: 43

Patch Set 16 : Rebase #

Patch Set 17 : Address some comments #

Patch Set 18 : No new needed #

Patch Set 19 : Address second wave of comments, turn off feedback in non-Chrome builds #

Unified diffs Side-by-side diffs Delta from patch set Stats (+465 lines, -589 lines) Patch
M chrome/browser/ui/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h View 1 2 1 chunk +0 lines, -52 lines 0 comments Download
D chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -99 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm View 1 2 1 chunk +0 lines, -106 lines 0 comments Download
A chrome/browser/ui/cocoa/tab_contents/sad_tab_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/tab_contents/sad_tab_mac_unittest.mm View 1 2 3 4 1 chunk +66 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.h View 1 2 1 chunk +2 lines, -15 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +68 lines, -58 lines 0 comments Download
D chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa_unittest.mm View 1 2 1 chunk +0 lines, -26 lines 0 comments Download
M chrome/browser/ui/sad_tab.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +30 lines, -4 lines 0 comments Download
M chrome/browser/ui/sad_tab.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +196 lines, -6 lines 0 comments Download
M chrome/browser/ui/sad_tab_helper.cc View 2 chunks +1 line, -5 lines 0 comments Download
M chrome/browser/ui/views/sad_tab_view.h View 1 3 chunks +1 line, -18 lines 0 comments Download
M chrome/browser/ui/views/sad_tab_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +42 lines, -196 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 76 (45 generated)
Sidney San Martín
Have at it, and thanks! I'm curious how you think removing SadTabController worked out. https://codereview.chromium.org/2261793002/diff/100001/chrome/browser/ui/sad_tab.cc ...
4 years, 3 months ago (2016-08-22 05:54:51 UTC) #16
Ilya Sherman
https://codereview.chromium.org/2261793002/diff/100001/base/metrics/histogram_macros.h File base/metrics/histogram_macros.h (right): https://codereview.chromium.org/2261793002/diff/100001/base/metrics/histogram_macros.h#newcode156 base/metrics/histogram_macros.h:156: static_cast<uint32_t>(boundary) + 1, flag)) I'm not comfortable with adding ...
4 years, 3 months ago (2016-08-22 20:52:13 UTC) #21
Sidney San Martín
https://codereview.chromium.org/2261793002/diff/100001/base/metrics/histogram_macros.h File base/metrics/histogram_macros.h (right): https://codereview.chromium.org/2261793002/diff/100001/base/metrics/histogram_macros.h#newcode156 base/metrics/histogram_macros.h:156: static_cast<uint32_t>(boundary) + 1, flag)) On 2016/08/22 20:52:12, Ilya Sherman ...
4 years, 3 months ago (2016-08-25 00:55:11 UTC) #23
Ilya Sherman
https://codereview.chromium.org/2261793002/diff/100001/base/metrics/histogram_macros.h File base/metrics/histogram_macros.h (right): https://codereview.chromium.org/2261793002/diff/100001/base/metrics/histogram_macros.h#newcode156 base/metrics/histogram_macros.h:156: static_cast<uint32_t>(boundary) + 1, flag)) On 2016/08/25 00:55:11, Sidney San ...
4 years, 3 months ago (2016-08-25 01:12:56 UTC) #25
Will Harris
https://codereview.chromium.org/2261793002/diff/140001/chrome/browser/ui/sad_tab.cc File chrome/browser/ui/sad_tab.cc (right): https://codereview.chromium.org/2261793002/diff/140001/chrome/browser/ui/sad_tab.cc#newcode81 chrome/browser/ui/sad_tab.cc:81: default: remove default, if possible https://codereview.chromium.org/2261793002/diff/140001/chrome/browser/ui/sad_tab.cc#newcode125 chrome/browser/ui/sad_tab.cc:125: default: can ...
4 years, 3 months ago (2016-08-26 16:44:50 UTC) #30
Sidney San Martín
https://codereview.chromium.org/2261793002/diff/100001/base/metrics/histogram_macros.h File base/metrics/histogram_macros.h (right): https://codereview.chromium.org/2261793002/diff/100001/base/metrics/histogram_macros.h#newcode156 base/metrics/histogram_macros.h:156: static_cast<uint32_t>(boundary) + 1, flag)) On 2016/08/25 01:12:56, Ilya Sherman ...
4 years, 3 months ago (2016-08-30 18:46:37 UTC) #33
Sidney San Martín
https://codereview.chromium.org/2261793002/diff/140001/chrome/browser/ui/sad_tab.cc File chrome/browser/ui/sad_tab.cc (right): https://codereview.chromium.org/2261793002/diff/140001/chrome/browser/ui/sad_tab.cc#newcode81 chrome/browser/ui/sad_tab.cc:81: default: On 2016/08/26 16:44:50, Will Harris wrote: > remove ...
4 years, 3 months ago (2016-08-30 19:31:58 UTC) #36
Ilya Sherman
Thanks! The details of the template magic are somewhat over my head, but I like ...
4 years, 3 months ago (2016-08-30 21:06:39 UTC) #45
Ilya Sherman
Sorry, meant to say: LGTM % nits.
4 years, 3 months ago (2016-08-30 21:07:17 UTC) #46
Sidney San Martín
Rerouting to thakis@ because the set of files I'm touching changed.
4 years, 3 months ago (2016-08-30 21:08:15 UTC) #47
Nico
https://codereview.chromium.org/2261793002/diff/200001/base/template_util_unittest.cc File base/template_util_unittest.cc (right): https://codereview.chromium.org/2261793002/diff/200001/base/template_util_unittest.cc#newcode38 base/template_util_unittest.cc:38: // Uncopyable() = default; ?
4 years, 3 months ago (2016-08-30 21:11:11 UTC) #48
Sidney San Martín
https://codereview.chromium.org/2261793002/diff/200001/base/template_util.h File base/template_util.h (right): https://codereview.chromium.org/2261793002/diff/200001/base/template_util.h#newcode129 base/template_util.h:129: #undef CR_USE_FALLBACKS_FOR_OLD_GLIBCXX On 2016/08/30 21:06:39, Ilya Sherman wrote: > ...
4 years, 3 months ago (2016-08-30 21:18:13 UTC) #49
Sidney San Martín
On 2016/08/30 21:06:39, Ilya Sherman wrote: > Thanks! The details of the template magic are ...
4 years, 3 months ago (2016-08-30 21:20:07 UTC) #50
Sidney San Martín
https://codereview.chromium.org/2261793002/diff/200001/base/template_util_unittest.cc File base/template_util_unittest.cc (right): https://codereview.chromium.org/2261793002/diff/200001/base/template_util_unittest.cc#newcode38 base/template_util_unittest.cc:38: // Uncopyable() = default; On 2016/08/30 21:11:11, Nico wrote: ...
4 years, 3 months ago (2016-08-30 21:24:32 UTC) #51
Ilya Sherman
On 2016/08/30 21:20:07, Sidney San Martín wrote: > On 2016/08/30 21:06:39, Ilya Sherman wrote: > ...
4 years, 3 months ago (2016-08-30 21:29:32 UTC) #52
Sidney San Martín
https://codereview.chromium.org/2261793002/diff/200001/base/template_util.h File base/template_util.h (right): https://codereview.chromium.org/2261793002/diff/200001/base/template_util.h#newcode129 base/template_util.h:129: #undef CR_USE_FALLBACKS_FOR_OLD_GLIBCXX On 2016/08/30 21:18:13, Sidney San Martín wrote: ...
4 years, 3 months ago (2016-08-30 21:30:33 UTC) #53
Sidney San Martín
[thakis@: I just made a couple of small changes to sad_tab.cc, sorry if you were ...
4 years, 3 months ago (2016-08-30 22:03:09 UTC) #55
Nico
(Which files did Ilya already look at and which am I supposed to look at?) ...
4 years, 3 months ago (2016-08-30 22:49:11 UTC) #58
Sidney San Martín
On 2016/08/30 22:49:11, Nico wrote: > (Which files did Ilya already look at and which ...
4 years, 3 months ago (2016-08-30 23:06:47 UTC) #59
Sidney San Martín
On 2016/08/30 23:06:47, Sidney San Martín wrote: > I think the explicit may have been ...
4 years, 3 months ago (2016-08-31 22:22:46 UTC) #60
Nico
This looks generally like a great change to me. I'm not super familiar with this ...
4 years, 3 months ago (2016-09-08 17:12:59 UTC) #62
James Cook
I like this change. Apologies in advance for a bunch of nits from a reviewer ...
4 years, 3 months ago (2016-09-08 20:15:50 UTC) #63
Sidney San Martín
No worries, thanks for your reviews! By the way, there's still an open question of ...
4 years, 3 months ago (2016-09-09 01:35:59 UTC) #64
Nico
lgtm once James is happy. Thanks! https://codereview.chromium.org/2261793002/diff/300001/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm File chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm (right): https://codereview.chromium.org/2261793002/diff/300001/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm#newcode87 chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm:87: NSMutableParagraphStyle* titleStyle = ...
4 years, 3 months ago (2016-09-09 01:48:42 UTC) #65
James Cook
LGTM with nits https://codereview.chromium.org/2261793002/diff/300001/chrome/browser/ui/sad_tab.cc File chrome/browser/ui/sad_tab.cc (right): https://codereview.chromium.org/2261793002/diff/300001/chrome/browser/ui/sad_tab.cc#newcode32 chrome/browser/ui/sad_tab.cc:32: #define UMA_SAD_TAB_COUNTER(NAME) \ On 2016/09/09 01:36:00, ...
4 years, 3 months ago (2016-09-09 04:37:09 UTC) #66
Sidney San Martín
Thanks again! CQ time. https://codereview.chromium.org/2261793002/diff/300001/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm File chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm (right): https://codereview.chromium.org/2261793002/diff/300001/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm#newcode87 chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm:87: NSMutableParagraphStyle* titleStyle = On 2016/09/09 ...
4 years, 3 months ago (2016-09-09 15:39:43 UTC) #67
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/2261793002/380001
4 years, 3 months ago (2016-09-09 15:40:36 UTC) #70
Nico
https://codereview.chromium.org/2261793002/diff/300001/chrome/browser/ui/sad_tab.h File chrome/browser/ui/sad_tab.h (right): https://codereview.chromium.org/2261793002/diff/300001/chrome/browser/ui/sad_tab.h#newcode51 chrome/browser/ui/sad_tab.h:51: #if DCHECK_IS_ON() On 2016/09/09 15:39:44, Sidney San Martín wrote: ...
4 years, 3 months ago (2016-09-09 15:45:30 UTC) #71
Sidney San Martín
https://codereview.chromium.org/2261793002/diff/300001/chrome/browser/ui/sad_tab.h File chrome/browser/ui/sad_tab.h (right): https://codereview.chromium.org/2261793002/diff/300001/chrome/browser/ui/sad_tab.h#newcode51 chrome/browser/ui/sad_tab.h:51: #if DCHECK_IS_ON() On 2016/09/09 15:45:30, Nico wrote: > On ...
4 years, 3 months ago (2016-09-09 15:47:18 UTC) #72
commit-bot: I haz the power
Committed patchset #19 (id:380001)
4 years, 3 months ago (2016-09-09 16:52:45 UTC) #74
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 16:55:22 UTC) #76
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/26cabf35396e65533b30062b89aee46cbf55b862
Cr-Commit-Position: refs/heads/master@{#417606}

Powered by Google App Engine
This is Rietveld 408576698