summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/options/content_page_gtk.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 18:14:28 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 18:14:28 +0000
commit89622004872be7f7ddaa24fa1694f76c7b9539b6 (patch)
tree81b8a42c7649c8cbca99d04305470ccbc1fe61fa /chrome/browser/gtk/options/content_page_gtk.cc
parentb7544eef7b81458a88597419eed6617c41e6d3dc (diff)
downloadchromium_src-89622004872be7f7ddaa24fa1694f76c7b9539b6.zip
chromium_src-89622004872be7f7ddaa24fa1694f76c7b9539b6.tar.gz
chromium_src-89622004872be7f7ddaa24fa1694f76c7b9539b6.tar.bz2
UMA cleanup. Replacing calls to RecordAction(char*) to use a new structure.
That way it is easier to keep track of those constants in reporting tools. TEST=Covered with standard ui tests Patch by Frank Mantek <fmantek@google.com>. Review URL: http://codereview.chromium.org/811005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/options/content_page_gtk.cc')
-rw-r--r--chrome/browser/gtk/options/content_page_gtk.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/chrome/browser/gtk/options/content_page_gtk.cc b/chrome/browser/gtk/options/content_page_gtk.cc
index 26951ac..45ccd26 100644
--- a/chrome/browser/gtk/options/content_page_gtk.cc
+++ b/chrome/browser/gtk/options/content_page_gtk.cc
@@ -422,17 +422,20 @@ void ContentPageGtk::OnImportButtonClicked(GtkWidget* widget) {
}
void ContentPageGtk::OnGtkThemeButtonClicked(GtkWidget* widget) {
- UserMetricsRecordAction("Options_GtkThemeSet", profile()->GetPrefs());
+ UserMetricsRecordAction(UserMetricsAction("Options_GtkThemeSet"),
+ profile()->GetPrefs());
profile()->SetNativeTheme();
}
void ContentPageGtk::OnResetDefaultThemeButtonClicked(GtkWidget* widget) {
- UserMetricsRecordAction("Options_ThemesReset", profile()->GetPrefs());
+ UserMetricsRecordAction(UserMetricsAction("Options_ThemesReset"),
+ profile()->GetPrefs());
profile()->ClearTheme();
}
void ContentPageGtk::OnGetThemesButtonClicked(GtkWidget* widget) {
- UserMetricsRecordAction("Options_ThemesGallery", profile()->GetPrefs());
+ UserMetricsRecordAction(UserMetricsAction("Options_ThemesGallery"),
+ profile()->GetPrefs());
BrowserList::GetLastActive()->OpenThemeGalleryTabAndActivate();
}
@@ -450,10 +453,10 @@ void ContentPageGtk::OnSystemTitleBarRadioToggled(GtkWidget* widget) {
bool use_custom = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(system_title_bar_hide_radio_));
if (use_custom) {
- UserMetricsRecordAction("Options_CustomFrame_Enable",
+ UserMetricsRecordAction(UserMetricsAction("Options_CustomFrame_Enable"),
profile()->GetPrefs());
} else {
- UserMetricsRecordAction("Options_CustomFrame_Disable",
+ UserMetricsRecordAction(UserMetricsAction("Options_CustomFrame_Disable"),
profile()->GetPrefs());
}
@@ -477,11 +480,12 @@ void ContentPageGtk::OnPasswordRadioToggled(GtkWidget* widget) {
bool enabled = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(passwords_asktosave_radio_));
if (enabled) {
- UserMetricsRecordAction("Options_PasswordManager_Enable",
- profile()->GetPrefs());
- } else {
- UserMetricsRecordAction("Options_PasswordManager_Disable",
+ UserMetricsRecordAction(UserMetricsAction("Options_PasswordManager_Enable"),
profile()->GetPrefs());
+ } else {
+ UserMetricsRecordAction(
+ UserMetricsAction("Options_PasswordManager_Disable"),
+ profile()->GetPrefs());
}
ask_to_save_passwords_.SetValue(enabled);
}
@@ -499,11 +503,11 @@ void ContentPageGtk::OnAutoFillRadioToggled(GtkWidget* widget) {
bool enabled = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(form_autofill_enable_radio_));
if (enabled) {
- UserMetricsRecordAction("Options_FormAutofill_Enable",
- profile()->GetPrefs());
+ UserMetricsRecordAction(UserMetricsAction("Options_FormAutofill_Enable"),
+ profile()->GetPrefs());
gtk_widget_set_sensitive(autofill_button_, TRUE);
} else {
- UserMetricsRecordAction("Options_FormAutofill_Disable",
+ UserMetricsRecordAction(UserMetricsAction("Options_FormAutofill_Disable"),
profile()->GetPrefs());
gtk_widget_set_sensitive(autofill_button_, FALSE);
}