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

Unified Diff: chrome/browser/ui/extensions/extension_install_ui_default.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: fit 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/ui/extensions/extension_install_ui_default.cc
diff --git a/chrome/browser/ui/extensions/extension_install_ui_default.cc b/chrome/browser/ui/extensions/extension_install_ui_default.cc
index 32b306b2f88f973b62445217ee4f45212cbe6f64..6f038d7d1eb71f6dd9bea61714f167b8ff3867b1 100644
--- a/chrome/browser/ui/extensions/extension_install_ui_default.cc
+++ b/chrome/browser/ui/extensions/extension_install_ui_default.cc
@@ -86,6 +86,7 @@ class ErrorInfoBarDelegate : public ConfirmInfoBarDelegate {
base::string16 GetMessageText() const override;
int GetButtons() const override;
base::string16 GetLinkText() const override;
+ GURL GetLinkURL() const override;
bool LinkClicked(WindowOpenDisposition disposition) override;
extensions::CrxInstallError error_;
@@ -122,10 +123,14 @@ base::string16 ErrorInfoBarDelegate::GetLinkText() const {
: base::string16();
}
+GURL ErrorInfoBarDelegate::GetLinkURL() const {
+ return GURL("https://support.google.com/chrome_webstore/?p=crx_warning");
+}
+
bool ErrorInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL(
content::OpenURLParams(
- GURL("https://support.google.com/chrome_webstore/?p=crx_warning"),
+ GetLinkURL(),
content::Referrer(),
(disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
ui::PAGE_TRANSITION_LINK, false));

Powered by Google App Engine
This is Rietveld 408576698