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

Unified Diff: chrome/browser/ui/webui/interstitials/interstitial_ui.cc

Issue 2961013004: Add Superfish interstitial to chrome://interstitials (Closed)
Patch Set: meacer comments, add browsertest Created 3 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/interstitials/interstitial_ui.cc
diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
index 7605395c315d18d6c0424cc718a788fed1179b7b..6e712e0eb0f1bcf527e723721f7e59a59a41094f 100644
--- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
+++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
@@ -126,7 +126,8 @@ class CaptivePortalBlockingPageWithNetInfo : public CaptivePortalBlockingPage {
};
#endif
-SSLBlockingPage* CreateSSLBlockingPage(content::WebContents* web_contents) {
+SSLBlockingPage* CreateSSLBlockingPage(content::WebContents* web_contents,
+ bool is_superfish) {
// Random parameters for SSL blocking page.
int cert_error = net::ERR_CERT_CONTAINS_ERRORS;
GURL request_url("https://example.com");
@@ -169,7 +170,7 @@ SSLBlockingPage* CreateSSLBlockingPage(content::WebContents* web_contents) {
options_mask |= security_interstitials::SSLErrorUI::STRICT_ENFORCEMENT;
return SSLBlockingPage::Create(
web_contents, cert_error, ssl_info, request_url, options_mask,
- time_triggered_, nullptr, false /* is superfish */,
+ time_triggered_, nullptr, is_superfish,
base::Callback<void(content::CertificateRequestResultType)>());
}
@@ -413,7 +414,12 @@ void InterstitialHTMLSource::StartDataRequest(
std::unique_ptr<content::InterstitialPageDelegate> interstitial_delegate;
std::string html;
if (base::StartsWith(path, "ssl", base::CompareCase::SENSITIVE)) {
- interstitial_delegate.reset(CreateSSLBlockingPage(web_contents));
+ interstitial_delegate.reset(
+ CreateSSLBlockingPage(web_contents, false /* is superfish */));
+ } else if (base::StartsWith(path, "superfish-ssl",
+ base::CompareCase::SENSITIVE)) {
+ interstitial_delegate.reset(
+ CreateSSLBlockingPage(web_contents, true /* is superfish */));
} else if (base::StartsWith(path, "safebrowsing",
base::CompareCase::SENSITIVE)) {
interstitial_delegate.reset(CreateSafeBrowsingBlockingPage(web_contents));
« no previous file with comments | « no previous file | chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698