Index: components/safe_browsing/base_blocking_page.h |
diff --git a/components/safe_browsing/base_blocking_page.h b/components/safe_browsing/base_blocking_page.h |
index 66c34e76dc0805bf8e461ebab59f3154cff13b04..7d20b7f693f62cdfed81b241e51a9234bc5d3cbc 100644 |
--- a/components/safe_browsing/base_blocking_page.h |
+++ b/components/safe_browsing/base_blocking_page.h |
@@ -53,6 +53,11 @@ class BaseBlockingPage |
void CommandReceived(const std::string& command) override; |
protected: |
+ // Used to specify which BaseSafeBrowsingErrorUI to instantiate, and |
+ // parameters they require. |
+ // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.safe_browsing |
+ enum class ErrorUiType { LOUD, QUIET_SMALL, QUIET_GIANT }; |
+ |
// Don't instantiate this class directly, use ShowBlockingPage instead. |
BaseBlockingPage( |
BaseUIManager* ui_manager, |
@@ -62,7 +67,8 @@ class BaseBlockingPage |
std::unique_ptr< |
security_interstitials::SecurityInterstitialControllerClient> |
controller_client, |
- const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options); |
+ const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options, |
+ ErrorUiType type); |
// SecurityInterstitialPage methods: |
bool ShouldCreateNewNavigation() const override; |
@@ -117,6 +123,8 @@ class BaseBlockingPage |
const UnsafeResourceList& unsafe_resources, |
BaseUIManager* ui_manager); |
+ int GetHTMLTemplateId() override; |
+ |
private: |
// For reporting back user actions. |
BaseUIManager* ui_manager_; |
@@ -131,9 +139,6 @@ class BaseBlockingPage |
// The list of unsafe resources this page is warning about. |
UnsafeResourceList unsafe_resources_; |
- // For displaying safe browsing interstitial. |
- std::unique_ptr<BaseSafeBrowsingErrorUI> sb_error_ui_; |
- |
// Indicate whether user has proceeded this blocking page. |
bool proceeded_; |
@@ -143,6 +148,9 @@ class BaseBlockingPage |
// milliseconds), in order to get data from the blocked resource itself. |
int64_t threat_details_proceed_delay_ms_; |
+ // For displaying safe browsing interstitial. |
+ std::unique_ptr<BaseSafeBrowsingErrorUI> sb_error_ui_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BaseBlockingPage); |
}; |