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

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

Issue 506663003: Consolidates accessing and setting the UMA pref to be within metrics code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typedef for callback type Created 6 years, 3 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
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 acc8e84fd230783b8a7ae42c73b38f0593408ece..ef43a73ed20883f69e3d5047ada5ae3ad06633d7 100644
--- a/chrome/browser/ui/views/session_crashed_bubble_view.cc
+++ b/chrome/browser/ui/views/session_crashed_bubble_view.cc
@@ -423,11 +423,7 @@ void SessionCrashedBubbleView::RestorePreviousSession(views::Button* sender) {
// Record user's choice for opting in to UMA.
// There's no opting-out choice in the crash restore bubble.
if (uma_option_ && uma_option_->checked()) {
- // TODO: Clean up function ResolveMetricsReportingEnabled so that user pref
- // is stored automatically.
- ResolveMetricsReportingEnabled(true);
- g_browser_process->local_state()->SetBoolean(
- prefs::kMetricsReportingEnabled, true);
+ InitiateMetricsReportingChange(true, OnMetricsReportingCallbackType());
RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN);
}
CloseBubble();

Powered by Google App Engine
This is Rietveld 408576698