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

Unified Diff: components/security_interstitials/core/safe_browsing_loud_error_ui.cc

Issue 2955503002: Make interstitial links open in a new tab (Closed)
Patch Set: Rebase CL Created 3 years, 6 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: components/security_interstitials/core/safe_browsing_loud_error_ui.cc
diff --git a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
index 12e67e3f66a91f33bc78fc2aafa3e718d1cf6179..a3d10ea7452b8ba8a16844765a1eef323c1e095e 100644
--- a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
+++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
@@ -20,9 +20,6 @@
namespace security_interstitials {
namespace {
-// URL for the Help Center
-const char kLearnMore[] = "https://support.google.com/chrome/";
-
// For malware interstitial pages, we link the problematic URL to Google's
// diagnostic page.
#if defined(GOOGLE_CHROME_BUILD)
@@ -165,12 +162,13 @@ void SafeBrowsingLoudErrorUI::HandleCommand(
// User pressed "Learn more".
controller()->metrics_helper()->RecordUserInteraction(
security_interstitials::MetricsHelper::SHOW_LEARN_MORE);
- GURL learn_more_url(kLearnMore);
+
+ GURL learn_more_url = controller()->GetHelpCenterUrl();
learn_more_url = net::AppendQueryParameter(
learn_more_url, "p", get_help_center_article_link());
learn_more_url =
google_util::AppendGoogleLocaleParam(learn_more_url, app_locale());
- controller()->OpenUrlInCurrentTab(learn_more_url);
+ controller()->OpenUrlInNewForegroundTab(learn_more_url);
break;
}
case CMD_RELOAD: {
@@ -197,7 +195,7 @@ void SafeBrowsingLoudErrorUI::HandleCommand(
GURL diagnostic_url(diagnostic);
diagnostic_url =
google_util::AppendGoogleLocaleParam(diagnostic_url, app_locale());
- controller()->OpenUrlInCurrentTab(diagnostic_url);
+ controller()->OpenUrlInNewForegroundTab(diagnostic_url);
break;
}
case CMD_REPORT_PHISHING_ERROR: {
@@ -206,7 +204,7 @@ void SafeBrowsingLoudErrorUI::HandleCommand(
GURL phishing_error_url(kReportPhishingErrorUrl);
phishing_error_url = google_util::AppendGoogleLocaleParam(
phishing_error_url, app_locale());
- controller()->OpenUrlInCurrentTab(phishing_error_url);
+ controller()->OpenUrlInNewForegroundTab(phishing_error_url);
break;
}
case CMD_OPEN_DATE_SETTINGS:

Powered by Google App Engine
This is Rietveld 408576698