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

Unified Diff: components/security_interstitials/core/base_safe_browsing_error_ui.h

Issue 2890703002: SafeBrowsing: allow WebView to customize the Help Center URL (Closed)
Patch Set: Rebase and fix compile errors, no logic 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/security_interstitials/core/base_safe_browsing_error_ui.h
diff --git a/components/security_interstitials/core/base_safe_browsing_error_ui.h b/components/security_interstitials/core/base_safe_browsing_error_ui.h
index bd7cf52a840aae145ed07615bdd23d65a2a5edb7..364b4f6f8d8e7468e5cc2cd50fe8031febf416ae 100644
--- a/components/security_interstitials/core/base_safe_browsing_error_ui.h
+++ b/components/security_interstitials/core/base_safe_browsing_error_ui.h
@@ -32,15 +32,10 @@ class BaseSafeBrowsingErrorUI {
bool is_extended_reporting_enabled,
bool is_scout_reporting_enabled,
bool is_proceed_anyway_disabled,
- bool is_resource_cancellable)
- : is_main_frame_load_blocked(is_main_frame_load_blocked),
- is_extended_reporting_opt_in_allowed(
- is_extended_reporting_opt_in_allowed),
- is_off_the_record(is_off_the_record),
- is_extended_reporting_enabled(is_extended_reporting_enabled),
- is_scout_reporting_enabled(is_scout_reporting_enabled),
- is_proceed_anyway_disabled(is_proceed_anyway_disabled),
- is_resource_cancellable(is_resource_cancellable) {}
+ bool is_resource_cancellable,
+ const std::string& help_center_article_link);
+
+ SBErrorDisplayOptions(const SBErrorDisplayOptions& other);
// Indicates if this SB interstitial is blocking main frame load.
bool is_main_frame_load_blocked;
@@ -63,6 +58,10 @@ class BaseSafeBrowsingErrorUI {
// Indicates if "back to safety" should cancel the pending navigation or
// navigate back after it's committed.
bool is_resource_cancellable;
+
+ // The p= query parameter used when visiting the Help Center. If this is
+ // nullptr, then a default value will be used for the SafeBrowsing article.
+ std::string help_center_article_link;
};
BaseSafeBrowsingErrorUI(
@@ -105,6 +104,10 @@ class BaseSafeBrowsingErrorUI {
return display_options_.is_resource_cancellable;
}
+ const std::string& get_help_center_article_link() const {
+ return display_options_.help_center_article_link;
+ }
+
// Checks if we should even show the extended reporting option. We don't show
// it in incognito mode or if kSafeBrowsingExtendedReportingOptInAllowed
// preference is disabled.
« no previous file with comments | « components/safe_browsing/base_blocking_page.cc ('k') | components/security_interstitials/core/base_safe_browsing_error_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698