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

Side by Side Diff: chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc

Issue 7637010: Add UMA metrics for register protocol handler, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update a comment 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg ate.h" 5 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg ate.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 8 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
9 #include "chrome/browser/google/google_util.h" 9 #include "chrome/browser/google/google_util.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 handler_.title()) : 63 handler_.title()) :
64 l10n_util::GetStringUTF16(IDS_REGISTER_PROTOCOL_HANDLER_DENY); 64 l10n_util::GetStringUTF16(IDS_REGISTER_PROTOCOL_HANDLER_DENY);
65 } 65 }
66 66
67 bool RegisterProtocolHandlerInfoBarDelegate::NeedElevation( 67 bool RegisterProtocolHandlerInfoBarDelegate::NeedElevation(
68 InfoBarButton button) const { 68 InfoBarButton button) const {
69 return button == BUTTON_OK; 69 return button == BUTTON_OK;
70 } 70 }
71 71
72 bool RegisterProtocolHandlerInfoBarDelegate::Accept() { 72 bool RegisterProtocolHandlerInfoBarDelegate::Accept() {
73 UserMetrics::RecordAction(UserMetricsAction( 73 UserMetrics::RecordAction(
74 "RegisterProtocolHandler.Infobar_Accept")); 74 UserMetricsAction("RegisterProtocolHandler.Infobar_Accept"));
75 registry_->OnAcceptRegisterProtocolHandler(handler_); 75 registry_->OnAcceptRegisterProtocolHandler(handler_);
76 return true; 76 return true;
77 } 77 }
78 78
79 bool RegisterProtocolHandlerInfoBarDelegate::Cancel() { 79 bool RegisterProtocolHandlerInfoBarDelegate::Cancel() {
80 UserMetrics::RecordAction(UserMetricsAction( 80 UserMetrics::RecordAction(
81 "RegisterProtocolHandler.InfoBar_Deny")); 81 UserMetricsAction("RegisterProtocolHandler.InfoBar_Deny"));
82 registry_->OnIgnoreRegisterProtocolHandler(handler_); 82 registry_->OnIgnoreRegisterProtocolHandler(handler_);
83 return true; 83 return true;
84 } 84 }
85 85
86 string16 RegisterProtocolHandlerInfoBarDelegate::GetLinkText() const { 86 string16 RegisterProtocolHandlerInfoBarDelegate::GetLinkText() const {
87 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); 87 return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
88 } 88 }
89 89
90 bool RegisterProtocolHandlerInfoBarDelegate::LinkClicked( 90 bool RegisterProtocolHandlerInfoBarDelegate::LinkClicked(
91 WindowOpenDisposition disposition) { 91 WindowOpenDisposition disposition) {
92 UserMetrics::RecordAction(UserMetricsAction( 92 UserMetrics::RecordAction(
93 "RegisterProtocolHandler.InfoBar_LearnMore")); 93 UserMetricsAction("RegisterProtocolHandler.InfoBar_LearnMore"));
94 tab_contents_->OpenURL(google_util::AppendGoogleLocaleParam(GURL( 94 tab_contents_->OpenURL(google_util::AppendGoogleLocaleParam(GURL(
95 chrome::kLearnMoreRegisterProtocolHandlerURL)), GURL(), 95 chrome::kLearnMoreRegisterProtocolHandlerURL)), GURL(),
96 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 96 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
97 PageTransition::LINK); 97 PageTransition::LINK);
98 return false; 98 return false;
99 } 99 }
OLDNEW
« 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