OLD | NEW |
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/browser/infobars/infobar_tab_helper.h" | 10 #include "chrome/browser/infobars/infobar_tab_helper.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( | 92 UserMetrics::RecordAction( |
93 UserMetricsAction("RegisterProtocolHandler.InfoBar_LearnMore")); | 93 UserMetricsAction("RegisterProtocolHandler.InfoBar_LearnMore")); |
94 owner()->tab_contents()->OpenURL(google_util::AppendGoogleLocaleParam(GURL( | 94 owner()->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 content::PAGE_TRANSITION_LINK); |
98 return false; | 98 return false; |
99 } | 99 } |
OLD | NEW |