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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 2852333003: Rename SafeBrowsingErrorUI to SafeBrowsingLoudErrorUI (Closed)
Patch Set: Add safe_browsing_blocking_page.cc Created 3 years, 7 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/safe_browsing/safe_browsing_blocking_page.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index e061902913b67b14119c6ea4f6307e883db8b2ab..e593b440123c581392ce05edf5b059de21b7acfc 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -16,6 +16,7 @@
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing_db/safe_browsing_prefs.h"
+#include "components/security_interstitials/core/safe_browsing_loud_error_ui.h"
felt 2017/05/05 00:28:29 Is this the right include? Do you need an include
edwardjung 2017/05/08 20:43:00 Removed.
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/interstitial_page.h"
#include "content/public/browser/navigation_entry.h"
@@ -24,7 +25,7 @@
using content::BrowserThread;
using content::InterstitialPage;
using content::WebContents;
-using security_interstitials::SafeBrowsingErrorUI;
+using security_interstitials::BaseSafeBrowsingErrorUI;
using security_interstitials::SecurityInterstitialControllerClient;
namespace safe_browsing {
@@ -67,7 +68,7 @@ class SafeBrowsingBlockingPageFactoryImpl
// Display Options below.
safe_browsing::UpdatePrefsBeforeSecurityInterstitial(prefs);
- SafeBrowsingErrorUI::SBErrorDisplayOptions display_options(
+ BaseSafeBrowsingErrorUI::SBErrorDisplayOptions display_options(
BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources),
is_extended_reporting_opt_in_allowed,
web_contents->GetBrowserContext()->IsOffTheRecord(),
@@ -102,7 +103,7 @@ SafeBrowsingBlockingPage::SafeBrowsingBlockingPage(
WebContents* web_contents,
const GURL& main_frame_url,
const UnsafeResourceList& unsafe_resources,
- const SafeBrowsingErrorUI::SBErrorDisplayOptions& display_options)
+ const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options)
: BaseBlockingPage(
ui_manager,
web_contents,
@@ -183,9 +184,8 @@ void SafeBrowsingBlockingPage::FinishThreatDetails(const base::TimeDelta& delay,
if (threat_details_.get() == NULL)
return; // Not all interstitials have threat details (eg., incognito mode).
- const bool enabled =
- sb_error_ui()->is_extended_reporting_enabled() &&
- sb_error_ui()->is_extended_reporting_opt_in_allowed();
+ const bool enabled = sb_error_ui()->is_extended_reporting_enabled() &&
+ sb_error_ui()->is_extended_reporting_opt_in_allowed();
if (!enabled)
return;
@@ -241,13 +241,13 @@ void SafeBrowsingBlockingPage::ShowBlockingPage(
// static
std::string SafeBrowsingBlockingPage::GetSamplingEventName(
- SafeBrowsingErrorUI::SBInterstitialReason interstitial_reason) {
+ BaseSafeBrowsingErrorUI::SBInterstitialReason interstitial_reason) {
switch (interstitial_reason) {
- case SafeBrowsingErrorUI::SB_REASON_MALWARE:
+ case BaseSafeBrowsingErrorUI::SB_REASON_MALWARE:
return kEventNameMalware;
- case SafeBrowsingErrorUI::SB_REASON_HARMFUL:
+ case BaseSafeBrowsingErrorUI::SB_REASON_HARMFUL:
return kEventNameHarmful;
- case SafeBrowsingErrorUI::SB_REASON_PHISHING:
+ case BaseSafeBrowsingErrorUI::SB_REASON_PHISHING:
return kEventNamePhishing;
default:
return kEventNameOther;

Powered by Google App Engine
This is Rietveld 408576698