Index: components/safe_browsing/base_blocking_page.cc |
diff --git a/components/safe_browsing/base_blocking_page.cc b/components/safe_browsing/base_blocking_page.cc |
index 3f91702ab29bc12d0feea3ac11851929a62e602e..40a8ded7dddfaabc8ec1a3727b65b06c383b1872 100644 |
--- a/components/safe_browsing/base_blocking_page.cc |
+++ b/components/safe_browsing/base_blocking_page.cc |
@@ -18,7 +18,7 @@ |
using content::InterstitialPage; |
using content::WebContents; |
-using security_interstitials::SafeBrowsingErrorUI; |
+using security_interstitials::SafeBrowsingLoudErrorUI; |
using security_interstitials::SecurityInterstitialControllerClient; |
namespace safe_browsing { |
@@ -42,7 +42,7 @@ BaseBlockingPage::BaseBlockingPage( |
const GURL& main_frame_url, |
const UnsafeResourceList& unsafe_resources, |
std::unique_ptr<SecurityInterstitialControllerClient> controller_client, |
- const SafeBrowsingErrorUI::SBErrorDisplayOptions& display_options) |
+ const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options) |
: SecurityInterstitialPage(web_contents, |
unsafe_resources[0].url, |
std::move(controller_client)), |
@@ -53,7 +53,7 @@ BaseBlockingPage::BaseBlockingPage( |
? -1 |
: web_contents->GetController().GetLastCommittedEntryIndex()), |
unsafe_resources_(unsafe_resources), |
- sb_error_ui_(base::MakeUnique<SafeBrowsingErrorUI>( |
+ sb_error_ui_(base::MakeUnique<SafeBrowsingLoudErrorUI>( |
unsafe_resources_[0].url, |
main_frame_url_, |
GetInterstitialReason(unsafe_resources_), |
@@ -68,10 +68,10 @@ BaseBlockingPage::BaseBlockingPage( |
BaseBlockingPage::~BaseBlockingPage() {} |
// static |
-const SafeBrowsingErrorUI::SBErrorDisplayOptions |
+const security_interstitials::BaseSafeBrowsingErrorUI::SBErrorDisplayOptions |
BaseBlockingPage::CreateDefaultDisplayOptions( |
const UnsafeResourceList& unsafe_resources) { |
- return SafeBrowsingErrorUI::SBErrorDisplayOptions( |
+ return BaseSafeBrowsingErrorUI::SBErrorDisplayOptions( |
IsMainPageLoadBlocked(unsafe_resources), |
false, // kSafeBrowsingExtendedReportingOptInAllowed |
false, // is_off_the_record |
@@ -146,7 +146,7 @@ void BaseBlockingPage::OnDontProceed() { |
return; |
UpdateMetricsAfterSecurityInterstitial(); |
- if (!sb_error_ui_->is_proceed_anyway_disabled()) { |
+ if (!sb_error_ui_->base_safe_browsing_error_ui.is_proceed_anyway_disabled()) { |
controller()->metrics_helper()->RecordUserDecision( |
security_interstitials::MetricsHelper::DONT_PROCEED); |
} |
@@ -201,7 +201,7 @@ void BaseBlockingPage::CommandReceived( |
} |
bool BaseBlockingPage::ShouldCreateNewNavigation() const { |
- return sb_error_ui_->is_main_frame_load_blocked(); |
+ return sb_error_ui_->base_safe_browsing_error_ui.is_main_frame_load_blocked(); |
} |
void BaseBlockingPage::PopulateInterstitialStrings( |
@@ -222,14 +222,14 @@ BaseBlockingPage::GetUnsafeResourcesMap() { |
// static |
std::string BaseBlockingPage::GetMetricPrefix( |
const UnsafeResourceList& unsafe_resources, |
- SafeBrowsingErrorUI::SBInterstitialReason interstitial_reason) { |
+ BaseSafeBrowsingErrorUI::SBInterstitialReason interstitial_reason) { |
bool primary_subresource = unsafe_resources[0].is_subresource; |
switch (interstitial_reason) { |
- case SafeBrowsingErrorUI::SB_REASON_MALWARE: |
+ case BaseSafeBrowsingErrorUI::SB_REASON_MALWARE: |
return primary_subresource ? "malware_subresource" : "malware"; |
- case SafeBrowsingErrorUI::SB_REASON_HARMFUL: |
+ case BaseSafeBrowsingErrorUI::SB_REASON_HARMFUL: |
return primary_subresource ? "harmful_subresource" : "harmful"; |
- case SafeBrowsingErrorUI::SB_REASON_PHISHING: |
+ case BaseSafeBrowsingErrorUI::SB_REASON_PHISHING: |
ThreatPatternType threat_pattern_type = |
unsafe_resources[0].threat_metadata.threat_pattern_type; |
if (threat_pattern_type == ThreatPatternType::PHISHING || |
@@ -271,7 +271,7 @@ std::string BaseBlockingPage::GetExtraMetricsSuffix( |
} |
// static |
-SafeBrowsingErrorUI::SBInterstitialReason |
+security_interstitials::BaseSafeBrowsingErrorUI::SBInterstitialReason |
BaseBlockingPage::GetInterstitialReason( |
const UnsafeResourceList& unsafe_resources) { |
bool harmful = false; |
@@ -281,7 +281,7 @@ BaseBlockingPage::GetInterstitialReason( |
safe_browsing::SBThreatType threat_type = resource.threat_type; |
if (threat_type == SB_THREAT_TYPE_URL_MALWARE || |
threat_type == SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL) { |
- return SafeBrowsingErrorUI::SB_REASON_MALWARE; |
+ return BaseSafeBrowsingErrorUI::SB_REASON_MALWARE; |
} else if (threat_type == SB_THREAT_TYPE_URL_UNWANTED) { |
harmful = true; |
} else { |
@@ -291,8 +291,8 @@ BaseBlockingPage::GetInterstitialReason( |
} |
if (harmful) |
- return SafeBrowsingErrorUI::SB_REASON_HARMFUL; |
- return SafeBrowsingErrorUI::SB_REASON_PHISHING; |
+ return BaseSafeBrowsingErrorUI::SB_REASON_HARMFUL; |
+ return BaseSafeBrowsingErrorUI::SB_REASON_PHISHING; |
} |
BaseUIManager* BaseBlockingPage::ui_manager() const { |
@@ -308,7 +308,7 @@ BaseBlockingPage::unsafe_resources() const { |
return unsafe_resources_; |
} |
-SafeBrowsingErrorUI* BaseBlockingPage::sb_error_ui() const { |
+SafeBrowsingLoudErrorUI* BaseBlockingPage::sb_error_ui() const { |
return sb_error_ui_.get(); |
} |
@@ -319,7 +319,7 @@ void BaseBlockingPage::set_proceeded(bool proceeded) { |
// static |
security_interstitials::MetricsHelper::ReportDetails |
BaseBlockingPage::GetReportingInfo(const UnsafeResourceList& unsafe_resources) { |
- SafeBrowsingErrorUI::SBInterstitialReason interstitial_reason = |
+ BaseSafeBrowsingErrorUI::SBInterstitialReason interstitial_reason = |
GetInterstitialReason(unsafe_resources); |
security_interstitials::MetricsHelper::ReportDetails reporting_info; |