summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl_manager.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-17 19:36:52 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-17 19:36:52 +0000
commita0729671be0628b5d2c45ef9c19a51c53bfa65b5 (patch)
tree5e4fadde19f6c5702a799cc3b786fee48fc4c9c0 /chrome/browser/ssl_manager.cc
parent39ae0a282dc3c1b9e1aea492e11c4d1439ac6921 (diff)
downloadchromium_src-a0729671be0628b5d2c45ef9c19a51c53bfa65b5.zip
chromium_src-a0729671be0628b5d2c45ef9c19a51c53bfa65b5.tar.gz
chromium_src-a0729671be0628b5d2c45ef9c19a51c53bfa65b5.tar.bz2
Revamp of the interstitial pages.
The interstitial is now a RVH that is displayed on top of the WebContents with no interaction with the WebContents' RenderViewHostManager. This simplifies the states that the RenderViewHostManager has. The interstitial is responsible for hiding and deleting itself when told to proceed/not proceed or when a navigation occurs or the tab is closed. The interstitial now uses a data URL (instead of loading some alternate HTML), which allowed me to remove some interstitial flags from NavigationController::LoadCommittedDetails and ProvisionalLoadDetails. Also changed tab_utils::GetTabContentsByID to return a WebContents since only WebContents have a RVH associated with them. TEST=Run all ui tests and unit tests. Review URL: http://codereview.chromium.org/13764 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7149 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl_manager.cc')
-rw-r--r--chrome/browser/ssl_manager.cc21
1 files changed, 7 insertions, 14 deletions
diff --git a/chrome/browser/ssl_manager.cc b/chrome/browser/ssl_manager.cc
index f76774a0..2a875d4 100644
--- a/chrome/browser/ssl_manager.cc
+++ b/chrome/browser/ssl_manager.cc
@@ -259,10 +259,10 @@ SSLManager::ErrorHandler::ErrorHandler(ResourceDispatcherHost* rdh,
void SSLManager::ErrorHandler::Dispatch() {
DCHECK(MessageLoop::current() == ui_loop_);
- TabContents* tab_contents =
- tab_util::GetTabContentsByID(render_process_host_id_, tab_contents_id_);
+ TabContents* web_contents =
+ tab_util::GetWebContentsByID(render_process_host_id_, tab_contents_id_);
- if (!tab_contents) {
+ if (!web_contents) {
// We arrived on the UI thread, but the tab we're looking for is no longer
// here.
OnDispatchFailed();
@@ -270,12 +270,12 @@ void SSLManager::ErrorHandler::Dispatch() {
}
// Hand ourselves off to the SSLManager.
- manager_ = tab_contents->controller()->ssl_manager();
+ manager_ = web_contents->controller()->ssl_manager();
OnDispatched();
}
-TabContents* SSLManager::ErrorHandler::GetTabContents() {
- return tab_util::GetTabContentsByID(render_process_host_id_,
+WebContents* SSLManager::ErrorHandler::GetWebContents() {
+ return tab_util::GetWebContentsByID(render_process_host_id_,
tab_contents_id_);
}
@@ -570,11 +570,6 @@ void SSLManager::DidCommitProvisionalLoad(
changed = true;
}
- if (details->is_interstitial) {
- // We should not have any errors when loading an interstitial page, and as
- // a consequence no messages.
- DCHECK(pending_messages_.empty());
- }
ShowPendingMessages();
}
@@ -615,14 +610,12 @@ void SSLManager::DidCommitProvisionalLoad(
void SSLManager::DidFailProvisionalLoadWithError(
ProvisionalLoadDetails* details) {
DCHECK(details);
- // A transitional page is not expected to fail.
- DCHECK(!details->interstitial_page());
// Ignore in-page navigations.
if (details->in_page_navigation())
return;
- if (details->main_frame() && !details->interstitial_page())
+ if (details->main_frame())
ClearPendingMessages();
}