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. Review-Url: https://codereview.chromium.org/2261793002 Cr-Commit-Position: refs/heads/master@{#417606}
Showing
This diff is collapsed.
Please register or sign in to comment