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

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: Created 6 years, 4 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 e95128f08a51b8fca2e65a2716d9ec16fa1f2917..210d10151caa47cc1643ab0c5ae3724e656e01c0 100644
--- a/chrome/browser/ui/views/session_crashed_bubble_view.cc
+++ b/chrome/browser/ui/views/session_crashed_bubble_view.cc
@@ -418,11 +418,8 @@ 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);
+ base::Callback<void(bool)> callback_fn;
+ InitiateMetricsReportingChange(callback_fn, true);
RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN);
}
CloseBubble();

Powered by Google App Engine
This is Rietveld 408576698