Commit 619f7e25 authored by yiyaoliu@chromium.org's avatar yiyaoliu@chromium.org

Correct when user_already_opted_in should be recorded

BUG=377813

Review URL: https://codereview.chromium.org/398073003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283848 0039d316-1c4b-4281-b951-d872f2087c98
parent b73bf250
...@@ -74,6 +74,7 @@ enum SessionCrashedBubbleHistogramValue { ...@@ -74,6 +74,7 @@ enum SessionCrashedBubbleHistogramValue {
SESSION_CRASHED_BUBBLE_UMA_OPTIN, SESSION_CRASHED_BUBBLE_UMA_OPTIN,
SESSION_CRASHED_BUBBLE_HELP, SESSION_CRASHED_BUBBLE_HELP,
SESSION_CRASHED_BUBBLE_IGNORED, SESSION_CRASHED_BUBBLE_IGNORED,
SESSION_CRASHED_BUBBLE_OPTIN_BAR_SHOWN,
SESSION_CRASHED_BUBBLE_MAX, SESSION_CRASHED_BUBBLE_MAX,
}; };
...@@ -159,9 +160,7 @@ void SessionCrashedBubbleView::ShowForReal( ...@@ -159,9 +160,7 @@ void SessionCrashedBubbleView::ShowForReal(
bool offer_uma_optin = false; bool offer_uma_optin = false;
#if defined(GOOGLE_CHROME_BUILD) #if defined(GOOGLE_CHROME_BUILD)
if (uma_opted_in_already) { if (!uma_opted_in_already) {
RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_ALREADY_UMA_OPTIN);
} else {
offer_uma_optin = g_browser_process->local_state()->FindPreference( offer_uma_optin = g_browser_process->local_state()->FindPreference(
prefs::kMetricsReportingEnabled)->IsUserModifiable(); prefs::kMetricsReportingEnabled)->IsUserModifiable();
} }
...@@ -188,7 +187,10 @@ void SessionCrashedBubbleView::ShowForReal( ...@@ -188,7 +187,10 @@ void SessionCrashedBubbleView::ShowForReal(
new SessionCrashedBubbleView(anchor_view, browser, web_contents, new SessionCrashedBubbleView(anchor_view, browser, web_contents,
offer_uma_optin); offer_uma_optin);
views::BubbleDelegateView::CreateBubble(crash_bubble)->Show(); views::BubbleDelegateView::CreateBubble(crash_bubble)->Show();
RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_SHOWN); RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_SHOWN);
if (uma_opted_in_already)
RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_ALREADY_UMA_OPTIN);
} }
SessionCrashedBubbleView::SessionCrashedBubbleView( SessionCrashedBubbleView::SessionCrashedBubbleView(
...@@ -282,8 +284,10 @@ void SessionCrashedBubbleView::Init() { ...@@ -282,8 +284,10 @@ void SessionCrashedBubbleView::Init() {
layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
// Metrics reporting option. // Metrics reporting option.
if (offer_uma_optin_) if (offer_uma_optin_) {
CreateUmaOptinView(layout); CreateUmaOptinView(layout);
RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_OPTIN_BAR_SHOWN);
}
set_margins(gfx::Insets()); set_margins(gfx::Insets());
Layout(); Layout();
......
...@@ -46059,6 +46059,7 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -46059,6 +46059,7 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<int value="4" label="User chose to opt in to UMA"/> <int value="4" label="User chose to opt in to UMA"/>
<int value="5" label="User clicked on the help button"/> <int value="5" label="User clicked on the help button"/>
<int value="6" label="User ignored or closed the bubble"/> <int value="6" label="User ignored or closed the bubble"/>
<int value="7" label="The bar with UMA opt-in option was shown."/>
</enum> </enum>
<enum name="SessionStartupPref" type="int"> <enum name="SessionStartupPref" type="int">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment