summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/first_run_dialog.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gtk/first_run_dialog.cc')
-rw-r--r--chrome/browser/gtk/first_run_dialog.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/gtk/first_run_dialog.cc b/chrome/browser/gtk/first_run_dialog.cc
index f7a104f..135fc60 100644
--- a/chrome/browser/gtk/first_run_dialog.cc
+++ b/chrome/browser/gtk/first_run_dialog.cc
@@ -8,8 +8,10 @@
#include "app/resource_bundle.h"
#include "base/message_loop.h"
#include "chrome/app/breakpad_linux.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/common/gtk_util.h"
+#include "chrome/common/pref_names.h"
#include "chrome/installer/util/google_update_settings.h"
#include "grit/generated_resources.h"
#include "grit/google_chrome_strings.h"
@@ -131,8 +133,14 @@ void FirstRunDialog::OnDialogResponse(GtkWidget* widget, int response) {
// Check if user has opted into reporting.
if (report_crashes_ &&
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(report_crashes_))) {
- if (GoogleUpdateSettings::SetCollectStatsConsent(true))
+ if (GoogleUpdateSettings::SetCollectStatsConsent(true)) {
+ PrefService* local_state = g_browser_process->local_state();
+ if (local_state)
+ local_state->SetBoolean(prefs::kMetricsReportingEnabled, true);
+ else
+ NOTREACHED();
InitCrashReporter();
+ }
} else {
GoogleUpdateSettings::SetCollectStatsConsent(false);
}