diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-23 18:14:28 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-23 18:14:28 +0000 |
commit | 89622004872be7f7ddaa24fa1694f76c7b9539b6 (patch) | |
tree | 81b8a42c7649c8cbca99d04305470ccbc1fe61fa /chrome/browser/tabs | |
parent | b7544eef7b81458a88597419eed6617c41e6d3dc (diff) | |
download | chromium_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/tabs')
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.cc | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc index 2fba4b5..ebebb463 100644 --- a/chrome/browser/tabs/tab_strip_model.cc +++ b/chrome/browser/tabs/tab_strip_model.cc @@ -588,23 +588,29 @@ void TabStripModel::ExecuteContextMenuCommand( DCHECK(command_id > CommandFirst && command_id < CommandLast); switch (command_id) { case CommandNewTab: - UserMetrics::RecordAction("TabContextMenu_NewTab", profile_); + UserMetrics::RecordAction(UserMetricsAction("TabContextMenu_NewTab"), + profile_); delegate()->AddBlankTabAt(context_index + 1, true); break; case CommandReload: - UserMetrics::RecordAction("TabContextMenu_Reload", profile_); + UserMetrics::RecordAction(UserMetricsAction("TabContextMenu_Reload"), + profile_); GetContentsAt(context_index)->controller().Reload(true); break; case CommandDuplicate: - UserMetrics::RecordAction("TabContextMenu_Duplicate", profile_); + UserMetrics::RecordAction(UserMetricsAction("TabContextMenu_Duplicate"), + profile_); delegate_->DuplicateContentsAt(context_index); break; case CommandCloseTab: - UserMetrics::RecordAction("TabContextMenu_CloseTab", profile_); + UserMetrics::RecordAction(UserMetricsAction("TabContextMenu_CloseTab"), + profile_); CloseTabContentsAt(context_index); break; case CommandCloseOtherTabs: { - UserMetrics::RecordAction("TabContextMenu_CloseOtherTabs", profile_); + UserMetrics::RecordAction( + UserMetricsAction("TabContextMenu_CloseOtherTabs"), + profile_); TabContents* contents = GetTabContentsAt(context_index); std::vector<int> closing_tabs; for (int i = count() - 1; i >= 0; --i) { @@ -615,7 +621,9 @@ void TabStripModel::ExecuteContextMenuCommand( break; } case CommandCloseTabsToRight: { - UserMetrics::RecordAction("TabContextMenu_CloseTabsToRight", profile_); + UserMetrics::RecordAction( + UserMetricsAction("TabContextMenu_CloseTabsToRight"), + profile_); std::vector<int> closing_tabs; for (int i = count() - 1; i > context_index; --i) { if (!IsMiniTab(i)) @@ -625,7 +633,9 @@ void TabStripModel::ExecuteContextMenuCommand( break; } case CommandCloseTabsOpenedBy: { - UserMetrics::RecordAction("TabContextMenu_CloseTabsOpenedBy", profile_); + UserMetrics::RecordAction( + UserMetricsAction("TabContextMenu_CloseTabsOpenedBy"), + profile_); std::vector<int> closing_tabs = GetIndexesOpenedBy(context_index); for (std::vector<int>::iterator i = closing_tabs.begin(); i != closing_tabs.end();) { @@ -638,12 +648,15 @@ void TabStripModel::ExecuteContextMenuCommand( break; } case CommandRestoreTab: { - UserMetrics::RecordAction("TabContextMenu_RestoreTab", profile_); + UserMetrics::RecordAction(UserMetricsAction("TabContextMenu_RestoreTab"), + profile_); delegate_->RestoreTab(); break; } case CommandTogglePinned: { - UserMetrics::RecordAction("TabContextMenu_TogglePinned", profile_); + UserMetrics::RecordAction( + UserMetricsAction("TabContextMenu_TogglePinned"), + profile_); SelectTabContentsAt(context_index, true); SetTabPinned(context_index, !IsTabPinned(context_index)); @@ -651,7 +664,9 @@ void TabStripModel::ExecuteContextMenuCommand( } case CommandBookmarkAllTabs: { - UserMetrics::RecordAction("TabContextMenu_BookmarkAllTabs", profile_); + UserMetrics::RecordAction( + UserMetricsAction("TabContextMenu_BookmarkAllTabs"), + profile_); delegate_->BookmarkAllTabs(); break; |