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

Unified Diff: chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc

Issue 7601021: Add UMA for register protocol handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile error Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
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 5033be95f83cd7ec3fe7faca84b976d1093b3dec..806ad1b13636d31d0d690f103b6452f3701ab68e 100644
--- a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
+++ b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/google/google_util.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/browser/user_metrics.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -69,11 +70,15 @@ bool RegisterProtocolHandlerInfoBarDelegate::NeedElevation(
}
bool RegisterProtocolHandlerInfoBarDelegate::Accept() {
+ UserMetrics::RecordAction(UserMetricsAction(
+ "RegisterProtocolHandler.Infobar_Accept"));
registry_->OnAcceptRegisterProtocolHandler(handler_);
return true;
}
bool RegisterProtocolHandlerInfoBarDelegate::Cancel() {
+ UserMetrics::RecordAction(UserMetricsAction(
+ "RegisterProtocolHandler.InfoBar_Deny"));
registry_->OnIgnoreRegisterProtocolHandler(handler_);
return true;
}
@@ -84,6 +89,8 @@ string16 RegisterProtocolHandlerInfoBarDelegate::GetLinkText() const {
bool RegisterProtocolHandlerInfoBarDelegate::LinkClicked(
WindowOpenDisposition disposition) {
+ UserMetrics::RecordAction(UserMetricsAction(
+ "RegisterProtocolHandler.InfoBar_LearnMore"));
tab_contents_->OpenURL(google_util::AppendGoogleLocaleParam(GURL(
chrome::kLearnMoreRegisterProtocolHandlerURL)), GURL(),
(disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
« no previous file with comments | « no previous file | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698