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: minor changes and fixes 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..6b4c2e6a24c0f1a2a65af7bb66bd7de64b667cd3 100644
--- a/chrome/browser/ui/views/session_crashed_bubble_view.cc
+++ b/chrome/browser/ui/views/session_crashed_bubble_view.cc
@@ -423,11 +423,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(true, callback_fn);
RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN);
}
CloseBubble();

Powered by Google App Engine
This is Rietveld 408576698