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

Unified Diff: chrome/browser/ssl/captive_portal_blocking_page.cc

Issue 2408713003: Show red lock icon on captive portal SSL interstitial (Closed)
Patch Set: Created 4 years, 2 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/ssl/captive_portal_blocking_page.cc
diff --git a/chrome/browser/ssl/captive_portal_blocking_page.cc b/chrome/browser/ssl/captive_portal_blocking_page.cc
index 7ec48333216851924003c9ded1a00717cdffc395..5ec37bd825e2a14317ee65eccf9e6753f41dcc4d 100644
--- a/chrome/browser/ssl/captive_portal_blocking_page.cc
+++ b/chrome/browser/ssl/captive_portal_blocking_page.cc
@@ -27,6 +27,8 @@
#include "components/security_interstitials/core/metrics_helper.h"
#include "components/url_formatter/url_formatter.h"
#include "components/wifi/wifi_service.h"
+#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/ssl_status.h"
#include "content/public/browser/web_contents.h"
#include "net/base/network_change_notifier.h"
#include "net/base/network_interfaces.h"
@@ -78,6 +80,7 @@ CaptivePortalBlockingPage::CaptivePortalBlockingPage(
request_url,
CreateMetricsHelper(web_contents, request_url)),
login_url_(login_url),
+ ssl_info_(ssl_info),
callback_(callback) {
DCHECK(login_url_.is_valid());
@@ -241,6 +244,11 @@ void CaptivePortalBlockingPage::CommandReceived(const std::string& command) {
}
}
+void CaptivePortalBlockingPage::OverrideEntry(content::NavigationEntry* entry) {
+ entry->GetSSL() = content::SSLStatus(
+ content::SECURITY_STYLE_AUTHENTICATION_BROKEN, ssl_info_.cert, ssl_info_);
+}
meacer 2016/10/10 19:14:43 Is it possible to push this call to the superclass
estark 2016/10/10 21:41:38 That's a surprisingly hard question to answer. :)
meacer 2016/10/10 22:08:50 Sounds great! Thanks for looking into this.
+
void CaptivePortalBlockingPage::OnProceed() {
NOTREACHED()
<< "Cannot proceed through the error on a captive portal interstitial.";
« no previous file with comments | « chrome/browser/ssl/captive_portal_blocking_page.h ('k') | chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698