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 f71f025747404ed21965cd4bf4d3ea24f05d87ff..c3b9ab54c3564a381055f5cfd396e8370b6a0e5e 100644 |
--- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc |
+++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc |
@@ -7,9 +7,11 @@ |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_util.h" |
#include "chrome/browser/browser_process.h" |
+#include "chrome/browser/captive_portal/captive_portal_service.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
#include "chrome/browser/safe_browsing/safe_browsing_service.h" |
+#include "chrome/browser/ssl/captive_portal_blocking_page.h" |
#include "chrome/browser/ssl/ssl_blocking_page.h" |
#include "chrome/common/url_constants.h" |
#include "chrome/grit/browser_resources.h" |
@@ -139,6 +141,18 @@ SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage( |
resource); |
} |
+CaptivePortalBlockingPage* CreateCaptivePortalBlockingPage( |
+ content::WebContents* web_contents) { |
+ GURL request_url("https://example.com"); |
+ GURL landing_url("https://example.com"); |
meacer
2015/06/19 17:46:25
You might want to make this a different URL than r
Bhanu Dev
2015/06/19 18:05:41
I think using request params is a good idea. Thank
meacer
2015/06/19 18:48:59
Either one works since we aren't issuing any reque
|
+ net::SSLInfo ssl_info; |
+ ssl_info.cert = new net::X509Certificate( |
+ request_url.host(), "CA", base::Time::Max(), base::Time::Max()); |
+ return new CaptivePortalBlockingPage( |
+ web_contents, request_url, landing_url,nullptr, ssl_info, |
meacer
2015/06/19 17:46:25
Space between landing_url and nullptr.
Doing |git
Bhanu Dev
2015/06/19 18:05:41
Thanks. I forgot the command. It really save time.
|
+ base::Callback<void(bool)>()); |
+} |
+ |
} // namespace |
InterstitialUI::InterstitialUI(content::WebUI* web_ui) |
@@ -186,6 +200,8 @@ void InterstitialHTMLSource::StartDataRequest( |
interstitial_delegate.reset(CreateSSLBlockingPage(web_contents_)); |
} else if (StartsWithASCII(path, "safebrowsing", true)) { |
interstitial_delegate.reset(CreateSafeBrowsingBlockingPage(web_contents_)); |
+ } else if (StartsWithASCII(path, "captiveportal", true)) { |
+ interstitial_delegate.reset(CreateCaptivePortalBlockingPage(web_contents_)); |
} |
std::string html; |