Commit e5d8ace7 authored by felt's avatar felt Committed by Commit bot

Change security warning links to point to localized help center article

BUG=402934

Review URL: https://codereview.chromium.org/515803002

Cr-Commit-Position: refs/heads/master@{#292508}
parent c1389309
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "base/task/cancelable_task_tracker.h" #include "base/task/cancelable_task_tracker.h"
#include "base/threading/sequenced_worker_pool.h" #include "base/threading/sequenced_worker_pool.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/history/history_service.h" #include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/safe_browsing/binary_feature_extractor.h" #include "chrome/browser/safe_browsing/binary_feature_extractor.h"
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
#include "chrome/common/safe_browsing/download_protection_util.h" #include "chrome/common/safe_browsing/download_protection_util.h"
#include "chrome/common/safe_browsing/zip_analyzer.h" #include "chrome/common/safe_browsing/zip_analyzer.h"
#include "chrome/common/url_constants.h" #include "chrome/common/url_constants.h"
#include "components/google/core/browser/google_util.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_item.h" #include "content/public/browser/download_item.h"
#include "content/public/browser/page_navigator.h" #include "content/public/browser/page_navigator.h"
...@@ -959,6 +961,8 @@ void DownloadProtectionService::ShowDetailsForDownload( ...@@ -959,6 +961,8 @@ void DownloadProtectionService::ShowDetailsForDownload(
const content::DownloadItem& item, const content::DownloadItem& item,
content::PageNavigator* navigator) { content::PageNavigator* navigator) {
GURL learn_more_url(chrome::kDownloadScanningLearnMoreURL); GURL learn_more_url(chrome::kDownloadScanningLearnMoreURL);
learn_more_url = google_util::AppendGoogleLocaleParam(
learn_more_url, g_browser_process->GetApplicationLocale());
navigator->OpenURL( navigator->OpenURL(
content::OpenURLParams(learn_more_url, content::OpenURLParams(learn_more_url,
content::Referrer(), content::Referrer(),
......
...@@ -302,23 +302,34 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) { ...@@ -302,23 +302,34 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) {
if (command == kLearnMoreCommand) { if (command == kLearnMoreCommand) {
// User pressed "Learn more". // User pressed "Learn more".
GURL url(interstitial_type_ == TYPE_PHISHING ?
kLearnMorePhishingUrlV2 : kLearnMoreMalwareUrlV2);
#if defined(ENABLE_EXTENSIONS) #if defined(ENABLE_EXTENSIONS)
if (sampling_event_.get()) if (sampling_event_.get())
sampling_event_->set_has_viewed_learn_more(true); sampling_event_->set_has_viewed_learn_more(true);
#endif #endif
OpenURLParams params( GURL learn_more_url(interstitial_type_ == TYPE_PHISHING ?
url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_LINK, false); kLearnMorePhishingUrlV2 : kLearnMoreMalwareUrlV2);
learn_more_url = google_util::AppendGoogleLocaleParam(
learn_more_url, g_browser_process->GetApplicationLocale());
OpenURLParams params(learn_more_url,
Referrer(),
CURRENT_TAB,
content::PAGE_TRANSITION_LINK,
false);
web_contents_->OpenURL(params); web_contents_->OpenURL(params);
return; return;
} }
if (command == kShowPrivacyCommand) { if (command == kShowPrivacyCommand) {
// User pressed "Safe Browsing privacy policy". // User pressed "Safe Browsing privacy policy".
GURL url(l10n_util::GetStringUTF8(IDS_SAFE_BROWSING_PRIVACY_POLICY_URL)); GURL privacy_url(
OpenURLParams params( l10n_util::GetStringUTF8(IDS_SAFE_BROWSING_PRIVACY_POLICY_URL));
url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_LINK, false); privacy_url = google_util::AppendGoogleLocaleParam(
privacy_url, g_browser_process->GetApplicationLocale());
OpenURLParams params(privacy_url,
Referrer(),
CURRENT_TAB,
content::PAGE_TRANSITION_LINK,
false);
web_contents_->OpenURL(params); web_contents_->OpenURL(params);
return; return;
} }
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "base/values.h" #include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
...@@ -26,6 +27,7 @@ ...@@ -26,6 +27,7 @@
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/grit/chromium_strings.h" #include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "components/google/core/browser/google_util.h"
#include "content/public/browser/cert_store.h" #include "content/public/browser/cert_store.h"
#include "content/public/browser/interstitial_page.h" #include "content/public/browser/interstitial_page.h"
#include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_controller.h"
...@@ -79,6 +81,9 @@ using extensions::ExperienceSamplingEvent; ...@@ -79,6 +81,9 @@ using extensions::ExperienceSamplingEvent;
namespace { namespace {
// URL for help page.
const char kHelpURL[] = "https://support.google.com/chrome/answer/4454607";
// Constants for the Experience Sampling instrumentation. // Constants for the Experience Sampling instrumentation.
#if defined(ENABLE_EXTENSIONS) #if defined(ENABLE_EXTENSIONS)
const char kEventNameBase[] = "ssl_interstitial_"; const char kEventNameBase[] = "ssl_interstitial_";
...@@ -583,8 +588,9 @@ void SSLBlockingPage::CommandReceived(const std::string& command) { ...@@ -583,8 +588,9 @@ void SSLBlockingPage::CommandReceived(const std::string& command) {
break; break;
} }
case CMD_HELP: { case CMD_HELP: {
content::NavigationController::LoadURLParams help_page_params(GURL( content::NavigationController::LoadURLParams help_page_params(
"https://support.google.com/chrome/answer/4454607")); google_util::AppendGoogleLocaleParam(
GURL(kHelpURL), g_browser_process->GetApplicationLocale()));
#if defined(ENABLE_EXTENSIONS) #if defined(ENABLE_EXTENSIONS)
if (sampling_event_.get()) if (sampling_event_.get())
sampling_event_->set_has_viewed_learn_more(true); sampling_event_->set_has_viewed_learn_more(true);
......
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