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

Side by Side Diff: chrome/browser/gtk/options/options_window_gtk.cc

Issue 115878: Hook up Linux crash reporting setting to options dialog. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <gtk/gtk.h> 5 #include <gtk/gtk.h>
6 6
7 #include "chrome/browser/options_window.h" 7 #include "chrome/browser/options_window.h"
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/profile.h" 12 #include "chrome/browser/profile.h"
13 #include "chrome/common/pref_member.h" 13 #include "chrome/common/pref_member.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "chrome/common/pref_service.h" 15 #include "chrome/common/pref_service.h"
16 #include "chrome/installer/util/google_update_settings.h"
16 #ifdef CHROME_PERSONALIZATION 17 #ifdef CHROME_PERSONALIZATION
17 #include "chrome/personalization/personalization.h" 18 #include "chrome/personalization/personalization.h"
18 #endif 19 #endif
19 #include "grit/chromium_strings.h" 20 #include "grit/chromium_strings.h"
20 #include "grit/generated_resources.h" 21 #include "grit/generated_resources.h"
21 22
22 /////////////////////////////////////////////////////////////////////////////// 23 ///////////////////////////////////////////////////////////////////////////////
23 // OptionsWindowGtk 24 // OptionsWindowGtk
24 // 25 //
25 // The contents of the Options dialog window. 26 // The contents of the Options dialog window.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 OptionsWindowGtk* options_window) { 201 OptionsWindowGtk* options_window) {
201 instance_ = NULL; 202 instance_ = NULL;
202 MessageLoop::current()->DeleteSoon(FROM_HERE, options_window); 203 MessageLoop::current()->DeleteSoon(FROM_HERE, options_window);
203 } 204 }
204 205
205 void OptionsWindowGtk::LoggingChanged(GtkWidget* metrics) { 206 void OptionsWindowGtk::LoggingChanged(GtkWidget* metrics) {
206 bool logging = (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(metrics)) == 207 bool logging = (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(metrics)) ==
207 TRUE); 208 TRUE);
208 g_browser_process->local_state()->SetBoolean(prefs::kMetricsReportingEnabled, 209 g_browser_process->local_state()->SetBoolean(prefs::kMetricsReportingEnabled,
209 logging); 210 logging);
211 GoogleUpdateSettings::SetCollectStatsConsent(logging);
210 } 212 }
211 213
212 /////////////////////////////////////////////////////////////////////////////// 214 ///////////////////////////////////////////////////////////////////////////////
213 // Factory/finder method: 215 // Factory/finder method:
214 216
215 void ShowOptionsWindow(OptionsPage page, 217 void ShowOptionsWindow(OptionsPage page,
216 OptionsGroup highlight_group, 218 OptionsGroup highlight_group,
217 Profile* profile) { 219 Profile* profile) {
218 DCHECK(profile); 220 DCHECK(profile);
219 // If there's already an existing options window, activate it and switch to 221 // If there's already an existing options window, activate it and switch to
220 // the specified page. 222 // the specified page.
221 if (!instance_) { 223 if (!instance_) {
222 instance_ = new OptionsWindowGtk(profile); 224 instance_ = new OptionsWindowGtk(profile);
223 } 225 }
224 instance_->ShowOptionsPage(page, highlight_group); 226 instance_->ShowOptionsPage(page, highlight_group);
225 } 227 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698