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

Unified Diff: chrome/browser/plugins/plugin_infobar_delegates.cc

Issue 1361253002: Separate the URL of an infobar link with clicking on it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pkasting Created 5 years, 3 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
Index: chrome/browser/plugins/plugin_infobar_delegates.cc
diff --git a/chrome/browser/plugins/plugin_infobar_delegates.cc b/chrome/browser/plugins/plugin_infobar_delegates.cc
index b9ebe0f38e1ad32cd276299d0df4d5aec8f0e0a2..87e5fba85bf758986444c43ee6b948d28fd6634c 100644
--- a/chrome/browser/plugins/plugin_infobar_delegates.cc
+++ b/chrome/browser/plugins/plugin_infobar_delegates.cc
@@ -152,15 +152,8 @@ base::string16 OutdatedPluginInfoBarDelegate::GetLinkText() const {
return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
}
-bool OutdatedPluginInfoBarDelegate::LinkClicked(
- WindowOpenDisposition disposition) {
- content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.LearnMore"));
- InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL(
- content::OpenURLParams(
- GURL(chrome::kOutdatedPluginLearnMoreURL), content::Referrer(),
- (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
- ui::PAGE_TRANSITION_LINK, false));
- return false;
+GURL OutdatedPluginInfoBarDelegate::GetLinkURL() const {
+ return GURL(chrome::kOutdatedPluginLearnMoreURL);
}
void OutdatedPluginInfoBarDelegate::DownloadStarted() {
@@ -277,20 +270,11 @@ base::string16 PluginMetroModeInfoBarDelegate::GetLinkText() const {
return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
}
-bool PluginMetroModeInfoBarDelegate::LinkClicked(
- WindowOpenDisposition disposition) {
- // TODO(shrikant): We may need to change language a little at following
- // support URLs. With new approach we will just restart for both missing
- // and not missing mode.
- InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL(
- content::OpenURLParams(
- GURL((mode_ == MISSING_PLUGIN) ?
- "https://support.google.com/chrome/?p=ib_display_in_desktop" :
- "https://support.google.com/chrome/?p=ib_redirect_to_desktop"),
- content::Referrer(),
- (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
- ui::PAGE_TRANSITION_LINK, false));
- return false;
+GURL PluginMetroModeInfoBarDelegate::GetLinkURL() const {
+ return GURL(
+ (mode_ == MISSING_PLUGIN)
+ ? "https://support.google.com/chrome/?p=ib_display_in_desktop"
+ : "https://support.google.com/chrome/?p=ib_redirect_to_desktop");
}
#endif // defined(OS_WIN)
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.h ('k') | chrome/browser/renderer_context_menu/spelling_bubble_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698