summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-15 00:25:39 +0000
committerkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-15 00:25:39 +0000
commit9657a9336eeefb903d32d3e553bc7643fa65fa7e (patch)
tree0883381f852226d81be7f127ff77cccd0d5579b7
parent93fc6ae2c9a63d0be01a0f7f00f1e6ce5a4c9594 (diff)
downloadchromium_src-9657a9336eeefb903d32d3e553bc7643fa65fa7e.zip
chromium_src-9657a9336eeefb903d32d3e553bc7643fa65fa7e.tar.gz
chromium_src-9657a9336eeefb903d32d3e553bc7643fa65fa7e.tar.bz2
Merge 96519 - Add UMA metrics for register protocol handler, part 2.
BUG=92440 TEST=none Review URL: http://codereview.chromium.org/7637010 TBR=isherman@chromium.org Review URL: http://codereview.chromium.org/7645018 git-svn-id: svn://svn.chromium.org/chrome/branches/835/src@96743 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc12
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc8
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.cc4
-rw-r--r--chrome/tools/chromeactions.txt6
-rwxr-xr-xchrome/tools/extract_actions.py2
5 files changed, 19 insertions, 13 deletions
diff --git a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
index 364bcb3..530aedb 100644
--- a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
+++ b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
@@ -64,15 +64,15 @@ string16 RegisterProtocolHandlerInfoBarDelegate::GetButtonLabel(
}
bool RegisterProtocolHandlerInfoBarDelegate::Accept() {
- UserMetrics::RecordAction(UserMetricsAction(
- "RegisterProtocolHandler.Infobar_Accept"));
+ UserMetrics::RecordAction(
+ UserMetricsAction("RegisterProtocolHandler.Infobar_Accept"));
registry_->OnAcceptRegisterProtocolHandler(handler_);
return true;
}
bool RegisterProtocolHandlerInfoBarDelegate::Cancel() {
- UserMetrics::RecordAction(UserMetricsAction(
- "RegisterProtocolHandler.InfoBar_Deny"));
+ UserMetrics::RecordAction(
+ UserMetricsAction("RegisterProtocolHandler.InfoBar_Deny"));
registry_->OnIgnoreRegisterProtocolHandler(handler_);
return true;
}
@@ -83,8 +83,8 @@ string16 RegisterProtocolHandlerInfoBarDelegate::GetLinkText() const {
bool RegisterProtocolHandlerInfoBarDelegate::LinkClicked(
WindowOpenDisposition disposition) {
- UserMetrics::RecordAction(UserMetricsAction(
- "RegisterProtocolHandler.InfoBar_LearnMore"));
+ UserMetrics::RecordAction(
+ UserMetricsAction("RegisterProtocolHandler.InfoBar_LearnMore"));
// Ignore the click dispostion and always open in a new top level tab.
tab_contents_->OpenURL(GURL(chrome::kLearnMoreRegisterProtocolHandlerURL),
GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 40bdd32..8dcda1b 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -1306,8 +1306,8 @@ void RenderViewContextMenu::ExecuteCommand(int id) {
if (handlers.empty()) {
return;
}
- UserMetrics::RecordAction(UserMetricsAction(
- "RegisterProtocolHandler.ContextMenu_Open"));
+ UserMetrics::RecordAction(
+ UserMetricsAction("RegisterProtocolHandler.ContextMenu_Open"));
int handlerIndex = id - IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_FIRST;
OpenURL(
handlers[handlerIndex].TranslateUrl(params_.link_url),
@@ -1630,8 +1630,8 @@ void RenderViewContextMenu::ExecuteCommand(int id) {
break;
#endif // OS_MACOSX
case IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_SETTINGS: {
- UserMetrics::RecordAction(UserMetricsAction(
- "RegisterProtocolHandler.ContextMenu_Settings"));
+ UserMetrics::RecordAction(
+ UserMetricsAction("RegisterProtocolHandler.ContextMenu_Settings"));
std::string url = std::string(chrome::kChromeUISettingsURL) +
chrome::kHandlerSettingsSubPage;
OpenURL(GURL(url), GURL(), 0, NEW_FOREGROUND_TAB, PageTransition::LINK);
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index 9ab918a..860ff35 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -569,8 +569,8 @@ void TabContentsWrapper::OnRegisterProtocolHandler(const std::string& protocol,
if (!handler.IsEmpty() &&
registry->CanSchemeBeOverridden(handler.protocol())) {
- UserMetrics::RecordAction(UserMetricsAction(
- "RegisterProtocolHandler.InfoBar_Shown"));
+ UserMetrics::RecordAction(
+ UserMetricsAction("RegisterProtocolHandler.InfoBar_Shown"));
AddInfoBar(new RegisterProtocolHandlerInfoBarDelegate(tab_contents(),
registry,
handler));
diff --git a/chrome/tools/chromeactions.txt b/chrome/tools/chromeactions.txt
index 50e6e83..117e2f9 100644
--- a/chrome/tools/chromeactions.txt
+++ b/chrome/tools/chromeactions.txt
@@ -1027,6 +1027,12 @@
0x05bdd1f2f9628b7a PrintView_ZoomPageWidth
0x89fa328f28747907 PrintView_ZoomPlus
0x5afeaba074ef570d Redo
+0x58d906ea1827983c RegisterProtocolHandler.ContextMenu_Open
+0x2f25b38028a24b10 RegisterProtocolHandler.ContextMenu_Settings
+0x21fd8c0ce09e106a RegisterProtocolHandler.InfoBar_Deny
+0xb1d098583dc63173 RegisterProtocolHandler.InfoBar_LearnMore
+0x1596504542ebc81d RegisterProtocolHandler.InfoBar_Shown
+0xee4b2f044de46f4b RegisterProtocolHandler.Infobar_Accept
0x4d1c8263ba103675 Reload
0x4641db18f24b11e1 ReloadIgnoringCache
0xbcc54eb67cab2ae9 RemoveFormat
diff --git a/chrome/tools/extract_actions.py b/chrome/tools/extract_actions.py
index 68f5352..acef0c8 100755
--- a/chrome/tools/extract_actions.py
+++ b/chrome/tools/extract_actions.py
@@ -12,7 +12,7 @@ as well as generating the lists of possible actions in situations where
there are many possible actions.
See also:
- chrome/browser/user_metrics.h
+ content/browser/user_metrics.h
http://wiki.corp.google.com/twiki/bin/view/Main/ChromeUserExperienceMetrics
If run with a "--hash" argument, chromeactions.txt will be updated.