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

Unified Diff: chrome/browser/captive_portal/captive_portal_tab_helper.h

Issue 318213002: Add custom interstitial for captive portals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Expand browser tests Created 6 years 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/captive_portal/captive_portal_tab_helper.h
diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper.h b/chrome/browser/captive_portal/captive_portal_tab_helper.h
index 99508a6114bfd3aa72c8df95ab10ddc1a50ae068..182fc68816ec72c64ac17af44219467cc463220e 100644
--- a/chrome/browser/captive_portal/captive_portal_tab_helper.h
+++ b/chrome/browser/captive_portal/captive_portal_tab_helper.h
@@ -20,7 +20,7 @@ class GURL;
class Profile;
namespace content {
- class WebContents;
+class WebContents;
}
namespace net {
@@ -95,6 +95,13 @@ class CaptivePortalTabHelper
// page. This is set to false when a captive portal is no longer detected.
bool IsLoginTab() const;
+ // Returns the delay to show an SSL interstitial if a cert error occurs.
+ base::TimeDelta GetSSLErrorDelay() const;
+
+ // Opens a login tab if the profile's active window doesn't have one already.
+ static void OpenLoginTabForWebContents(content::WebContents* web_contents,
+ bool focus);
+
private:
friend class CaptivePortalBrowserTest;
friend class CaptivePortalTabHelperTest;
@@ -121,15 +128,14 @@ class CaptivePortalTabHelper
// |this| takes ownership of |tab_reloader|.
void SetTabReloaderForTest(CaptivePortalTabReloader* tab_reloader);
+ void SetSSLErrorDelayForTest(base::TimeDelta ssl_error_delay);
+
const content::RenderViewHost* provisional_render_view_host() const {
return provisional_render_view_host_;
}
CaptivePortalTabReloader* GetTabReloaderForTest();
- // Opens a login tab if the profile's active window doesn't have one already.
- void OpenLoginTab();
-
Profile* profile_;
// Neither of these will ever be NULL.
@@ -143,6 +149,8 @@ class CaptivePortalTabHelper
// net::OK, otherwise.
int pending_error_code_;
+ base::TimeDelta ssl_error_delay_;
mmenke 2014/12/09 22:42:26 As much as I dislike statics variables, I think th
meacer 2014/12/10 22:48:02 Moved to SSLErrorHandler as a static variable.
+
// The RenderViewHost with a provisional load, if any. Can either be
// the currently displayed RenderViewHost or a pending RenderViewHost for
// cross-process navitations. NULL when there's currently no provisional

Powered by Google App Engine
This is Rietveld 408576698