summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos
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/chromeos
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/chromeos')
-rw-r--r--chrome/browser/chromeos/compact_location_bar_view.cc2
-rw-r--r--chrome/browser/chromeos/external_metrics.cc10
-rw-r--r--chrome/browser/chromeos/options/system_page_view.cc22
3 files changed, 19 insertions, 15 deletions
diff --git a/chrome/browser/chromeos/compact_location_bar_view.cc b/chrome/browser/chromeos/compact_location_bar_view.cc
index 576f114..2ef1b21 100644
--- a/chrome/browser/chromeos/compact_location_bar_view.cc
+++ b/chrome/browser/chromeos/compact_location_bar_view.cc
@@ -281,7 +281,7 @@ void CompactLocationBarView::WriteDragData(views::View* sender,
OSExchangeData* data) {
DCHECK(GetDragOperations(sender, press_pt) != DragDropTypes::DRAG_NONE);
- UserMetrics::RecordAction("CompactLocationBar_DragStar",
+ UserMetrics::RecordAction(UserMetricsAction("CompactLocationBar_DragStar"),
browser()->profile());
// If there is a bookmark for the URL, add the bookmark drag data for it. We
diff --git a/chrome/browser/chromeos/external_metrics.cc b/chrome/browser/chromeos/external_metrics.cc
index 3eb8936..b0ce3f3 100644
--- a/chrome/browser/chromeos/external_metrics.cc
+++ b/chrome/browser/chromeos/external_metrics.cc
@@ -1,5 +1,5 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use
-// of this source code is governed by a BSD-style license that can be
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/external_metrics.h"
@@ -47,11 +47,13 @@ static Profile* external_metrics_profile = NULL;
// call RecordAction in a way that gets picked up by the processing scripts.
static void RecordTabOverviewKeystroke(const char* ignore) {
- UserMetrics::RecordAction("TabOverview_Keystroke", external_metrics_profile);
+ UserMetrics::RecordAction(UserMetricsAction("TabOverview_Keystroke"),
+ external_metrics_profile);
}
static void RecordTabOverviewExitMouse(const char* ignore) {
- UserMetrics::RecordAction("TabOverview_ExitMouse", external_metrics_profile);
+ UserMetrics::RecordAction(UserMetricsAction("TabOverview_ExitMouse"),
+ external_metrics_profile);
}
static void RecordBootTime(const char* info) {
diff --git a/chrome/browser/chromeos/options/system_page_view.cc b/chrome/browser/chromeos/options/system_page_view.cc
index 3032dd7..cd9b491 100644
--- a/chrome/browser/chromeos/options/system_page_view.cc
+++ b/chrome/browser/chromeos/options/system_page_view.cc
@@ -250,16 +250,16 @@ void TouchpadSection::ButtonPressed(
if (sender == enable_tap_to_click_checkbox_) {
bool enabled = enable_tap_to_click_checkbox_->checked();
UserMetricsRecordAction(enabled ?
- "Options_TapToClickCheckbox_Enable" :
- "Options_TapToClickCheckbox_Disable",
- profile()->GetPrefs());
+ UserMetricsAction("Options_TapToClickCheckbox_Enable") :
+ UserMetricsAction("Options_TapToClickCheckbox_Disable"),
+ profile()->GetPrefs());
tap_to_click_enabled_.SetValue(enabled);
} else if (sender == enable_vert_edge_scroll_checkbox_) {
bool enabled = enable_vert_edge_scroll_checkbox_->checked();
UserMetricsRecordAction(enabled ?
- "Options_VertEdgeScrollCheckbox_Enable" :
- "Options_VertEdgeScrollCheckbox_Disable",
- profile()->GetPrefs());
+ UserMetricsAction("Options_VertEdgeScrollCheckbox_Enable") :
+ UserMetricsAction("Options_VertEdgeScrollCheckbox_Disable"),
+ profile()->GetPrefs());
vert_edge_scroll_enabled_.SetValue(enabled);
}
}
@@ -267,13 +267,15 @@ void TouchpadSection::ButtonPressed(
void TouchpadSection::SliderValueChanged(views::Slider* sender) {
if (sender == speed_factor_slider_) {
double value = speed_factor_slider_->value();
- UserMetricsRecordAction("Options_SpeedFactorSlider_Changed",
- profile()->GetPrefs());
+ UserMetricsRecordAction(
+ UserMetricsAction("Options_SpeedFactorSlider_Changed"),
+ profile()->GetPrefs());
speed_factor_.SetValue(value);
} else if (sender == sensitivity_slider_) {
double value = sensitivity_slider_->value();
- UserMetricsRecordAction("Options_SensitivitySlider_Changed",
- profile()->GetPrefs());
+ UserMetricsRecordAction(
+ UserMetricsAction("Options_SensitivitySlider_Changed"),
+ profile()->GetPrefs());
sensitivity_.SetValue(value);
}
}