summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run_gtk.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-28 20:23:06 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-28 20:23:06 +0000
commit1e7377df1449c4e543a50c8a8a1425599c8425f7 (patch)
tree6e8ee3adcba66e4a043e91e91e0217467682a7fd /chrome/browser/first_run_gtk.cc
parent34cf340da15aceffd59c3d05e0de2a3bc5174a2d (diff)
downloadchromium_src-1e7377df1449c4e543a50c8a8a1425599c8425f7.zip
chromium_src-1e7377df1449c4e543a50c8a8a1425599c8425f7.tar.gz
chromium_src-1e7377df1449c4e543a50c8a8a1425599c8425f7.tar.bz2
Respect Linux user prefs with regards to crash reporting.
This involves implementing GoogleUpdateSettings::[GS]etCollectStatsConsent, and a whole lot of refactoring. BUG=none TEST=delete config dir, run official Linux build, don't enable crash reporting, crash browser -> no crash reporting. Review URL: http://codereview.chromium.org/115808 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run_gtk.cc')
-rw-r--r--chrome/browser/first_run_gtk.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/chrome/browser/first_run_gtk.cc b/chrome/browser/first_run_gtk.cc
index 8543780..5447a3f 100644
--- a/chrome/browser/first_run_gtk.cc
+++ b/chrome/browser/first_run_gtk.cc
@@ -4,10 +4,12 @@
#include "chrome/browser/first_run.h"
+#include "chrome/app/breakpad_linux.h"
// We need to reach through the browser process to tweak the metrics flag.
#include "chrome/browser/browser_process.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
+#include "chrome/installer/util/google_update_settings.h"
#include "base/message_loop.h"
@@ -94,11 +96,15 @@ void OpenFirstRunDialog(Profile* profile, ProcessSingleton* process_singleton) {
MessageLoop::current()->Run();
// End of above TODO.
- if (response == GTK_RESPONSE_ACCEPT &&
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check))) {
- // They opted in.
- g_browser_process->local_state()->SetBoolean(
- prefs::kMetricsReportingEnabled, true);
+ if (response == GTK_RESPONSE_ACCEPT) {
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check))) {
+ // They opted in.
+ if (GoogleUpdateSettings::SetCollectStatsConsent(true)) {
+ InitCrashReporter();
+ }
+ } else {
+ GoogleUpdateSettings::SetCollectStatsConsent(false);
+ }
}
gtk_widget_destroy(dialog);