Commit 76854f6c authored by Carlos IL's avatar Carlos IL Committed by Commit Bot

Add Symantec URL to ConnectionHelpTabHelper

After crrev.com/c/1262637 interstiitals will link to a different
support URL for Symantec errors, check against that one too in
ConnectionHelpTabHelper.

Change-Id: I1318534ad3db2235b1e8f5f383d7c69ad74db65c
Reviewed-on: https://chromium-review.googlesource.com/c/1265081Reviewed-by: default avatarChristopher Thompson <cthomp@chromium.org>
Commit-Queue: Carlos IL <carlosil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597250}
parent e6c0162b
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "base/feature_list.h" #include "base/feature_list.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "chrome/browser/ssl/ssl_blocking_page.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_features.h" #include "chrome/common/chrome_features.h"
#include "content/public/browser/navigation_handle.h" #include "content/public/browser/navigation_handle.h"
...@@ -35,10 +36,8 @@ void MaybeRedirectToBundledHelp(content::WebContents* web_contents) { ...@@ -35,10 +36,8 @@ void MaybeRedirectToBundledHelp(content::WebContents* web_contents) {
ConnectionHelpTabHelper::~ConnectionHelpTabHelper() {} ConnectionHelpTabHelper::~ConnectionHelpTabHelper() {}
void ConnectionHelpTabHelper::DidAttachInterstitialPage() { void ConnectionHelpTabHelper::DidAttachInterstitialPage() {
GURL::Replacements replacements; if (web_contents()->GetURL().EqualsIgnoringRef(GetHelpCenterURL()) ||
replacements.ClearRef(); web_contents()->GetURL().EqualsIgnoringRef(GURL(kSymantecSupportUrl))) {
if (web_contents()->GetURL().ReplaceComponents(replacements) ==
GetHelpCenterURL()) {
UMA_HISTOGRAM_ENUMERATION( UMA_HISTOGRAM_ENUMERATION(
"SSL.CertificateErrorHelpCenterVisited", "SSL.CertificateErrorHelpCenterVisited",
ConnectionHelpTabHelper::LearnMoreClickResult::kFailedWithInterstitial, ConnectionHelpTabHelper::LearnMoreClickResult::kFailedWithInterstitial,
...@@ -49,11 +48,9 @@ void ConnectionHelpTabHelper::DidAttachInterstitialPage() { ...@@ -49,11 +48,9 @@ void ConnectionHelpTabHelper::DidAttachInterstitialPage() {
void ConnectionHelpTabHelper::DidFinishNavigation( void ConnectionHelpTabHelper::DidFinishNavigation(
content::NavigationHandle* navigation_handle) { content::NavigationHandle* navigation_handle) {
GURL::Replacements replacements;
replacements.ClearRef();
if (navigation_handle->IsInMainFrame() && if (navigation_handle->IsInMainFrame() &&
web_contents()->GetURL().ReplaceComponents(replacements) == (web_contents()->GetURL().EqualsIgnoringRef(GetHelpCenterURL()) ||
GetHelpCenterURL()) { web_contents()->GetURL().EqualsIgnoringRef(GURL(kSymantecSupportUrl)))) {
LearnMoreClickResult histogram_value; LearnMoreClickResult histogram_value;
if (navigation_handle->IsErrorPage()) { if (navigation_handle->IsErrorPage()) {
if (base::FeatureList::IsEnabled(features::kSSLCommittedInterstitials) && if (base::FeatureList::IsEnabled(features::kSSLCommittedInterstitials) &&
......
...@@ -45,9 +45,6 @@ using security_interstitials::SSLErrorUI; ...@@ -45,9 +45,6 @@ using security_interstitials::SSLErrorUI;
namespace { namespace {
const char kSymantecSupportUrl[] =
"https://support.google.com/chrome?p=symantec";
std::unique_ptr<ChromeMetricsHelper> CreateSslProblemMetricsHelper( std::unique_ptr<ChromeMetricsHelper> CreateSslProblemMetricsHelper(
content::WebContents* web_contents, content::WebContents* web_contents,
int cert_error, int cert_error,
......
...@@ -32,6 +32,13 @@ class SSLErrorUI; ...@@ -32,6 +32,13 @@ class SSLErrorUI;
class ChromeMetricsHelper; class ChromeMetricsHelper;
// URL to use as the 'Learn More' link when the interstitial is caused by
// a "ERR_CERT_SYMANTEC_LEGACY" error, -202 fragment is included so
// chrome://connection-help expands the right section if the user can't reach
// the help center.
const char kSymantecSupportUrl[] =
"https://support.google.com/chrome?p=symantec#-202";
// This class is responsible for showing/hiding the interstitial page that is // This class is responsible for showing/hiding the interstitial page that is
// shown when a certificate error happens. // shown when a certificate error happens.
// It deletes itself when the interstitial page is closed. // It deletes itself when the interstitial page is closed.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment