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

Unified Diff: components/safe_browsing/base_blocking_page.h

Issue 2898593002: WebView: choose loud vs. quiet interstitial (Closed)
Patch Set: Update WebView test for behavior change 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: 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..ff9bd7f1f62cd62838e550bd9fce61fc4b55f5d8 100644
--- a/components/safe_browsing/base_blocking_page.h
+++ b/components/safe_browsing/base_blocking_page.h
@@ -53,6 +53,10 @@ class BaseBlockingPage
void CommandReceived(const std::string& command) override;
protected:
+ // Used to specify which BaseSafeBrowsingErrorUI to instantiate, and
+ // parameters they require
Jialiu Lin 2017/05/22 17:06:00 period at the end.
Nate Fischer 2017/05/22 23:13:46 Done.
+ enum class ErrorUiType { LOUD, QUIET_SMALL, QUIET_GIANT };
+
// Don't instantiate this class directly, use ShowBlockingPage instead.
BaseBlockingPage(
BaseUIManager* ui_manager,
@@ -62,7 +66,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 +122,8 @@ class BaseBlockingPage
const UnsafeResourceList& unsafe_resources,
BaseUIManager* ui_manager);
+ int GetHTMLTemplateId() override;
+
private:
// For reporting back user actions.
BaseUIManager* ui_manager_;
@@ -143,6 +150,8 @@ class BaseBlockingPage
// milliseconds), in order to get data from the blocked resource itself.
int64_t threat_details_proceed_delay_ms_;
+ ErrorUiType error_type_;
Jialiu Lin 2017/05/22 17:06:00 nit: can it be const?
Nate Fischer 2017/05/22 23:13:46 Acknowledged. Found a way to remove the member com
+
DISALLOW_COPY_AND_ASSIGN(BaseBlockingPage);
};

Powered by Google App Engine
This is Rietveld 408576698