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

Unified Diff: chrome/browser/ui/views/session_crashed_bubble_view.cc

Issue 398073003: Correct when bubble_shown should be recorded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/session_crashed_bubble_view.cc
diff --git a/chrome/browser/ui/views/session_crashed_bubble_view.cc b/chrome/browser/ui/views/session_crashed_bubble_view.cc
index 8d5fa3356863d8e020e08dc4873b8e15b4f0fa33..9bfe461359ea47e4cc45bbff7035de055cba5a52 100644
--- a/chrome/browser/ui/views/session_crashed_bubble_view.cc
+++ b/chrome/browser/ui/views/session_crashed_bubble_view.cc
@@ -74,6 +74,7 @@ enum SessionCrashedBubbleHistogramValue {
SESSION_CRASHED_BUBBLE_UMA_OPTIN,
SESSION_CRASHED_BUBBLE_HELP,
SESSION_CRASHED_BUBBLE_IGNORED,
+ SESSION_CRASHED_BUBBLE_OPTIN_BAR_SHOWN,
SESSION_CRASHED_BUBBLE_MAX,
};
@@ -159,12 +160,9 @@ void SessionCrashedBubbleView::ShowForReal(
bool offer_uma_optin = false;
#if defined(GOOGLE_CHROME_BUILD)
- if (uma_opted_in_already) {
- RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_ALREADY_UMA_OPTIN);
- } else {
+ if (!uma_opted_in_already)
Alexei Svitkine (slow) 2014/07/17 15:15:36 Nit: Add {}'s.
yao 2014/07/17 15:41:22 Done.
offer_uma_optin = g_browser_process->local_state()->FindPreference(
prefs::kMetricsReportingEnabled)->IsUserModifiable();
- }
#endif // defined(GOOGLE_CHROME_BUILD)
Browser* browser = browser_observer->browser();
@@ -188,7 +186,10 @@ void SessionCrashedBubbleView::ShowForReal(
new SessionCrashedBubbleView(anchor_view, browser, web_contents,
offer_uma_optin);
views::BubbleDelegateView::CreateBubble(crash_bubble)->Show();
+
RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_SHOWN);
+ if (uma_opted_in_already)
+ RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_ALREADY_UMA_OPTIN);
}
SessionCrashedBubbleView::SessionCrashedBubbleView(
@@ -282,8 +283,10 @@ void SessionCrashedBubbleView::Init() {
layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
// Metrics reporting option.
- if (offer_uma_optin_)
+ if (offer_uma_optin_) {
CreateUmaOptinView(layout);
+ RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_OPTIN_BAR_SHOWN);
+ }
set_margins(gfx::Insets());
Layout();
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698