diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-17 19:57:24 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-17 19:57:24 +0000 |
commit | 7cef64b495701e8ff17b2fbb6e632aa34eee450f (patch) | |
tree | 8af439034838b28edd0223010a1f6aad4b2f61ce /chrome/browser/ssl_policy.cc | |
parent | a16d22388edff186095e37fecd5537beae88c7c9 (diff) | |
download | chromium_src-7cef64b495701e8ff17b2fbb6e632aa34eee450f.zip chromium_src-7cef64b495701e8ff17b2fbb6e632aa34eee450f.tar.gz chromium_src-7cef64b495701e8ff17b2fbb6e632aa34eee450f.tar.bz2 |
Reverting 7149.
Review URL: http://codereview.chromium.org/15004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl_policy.cc')
-rw-r--r-- | chrome/browser/ssl_policy.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/ssl_policy.cc b/chrome/browser/ssl_policy.cc index f89cdcd..8ed4486 100644 --- a/chrome/browser/ssl_policy.cc +++ b/chrome/browser/ssl_policy.cc @@ -61,7 +61,9 @@ ShowUnsafeContentTask::~ShowUnsafeContentTask() { void ShowUnsafeContentTask::Run() { error_handler_->manager()->AllowShowInsecureContentForURL(main_frame_url_); // Reload the page. - error_handler_->GetWebContents()->controller()->Reload(true); + DCHECK(error_handler_->GetTabContents()->type() == TAB_CONTENTS_WEB); + WebContents* tab = error_handler_->GetTabContents()->AsWebContents(); + tab->controller()->Reload(true); } static void ShowErrorPage(SSLPolicy* policy, SSLManager::CertError* error) { @@ -89,7 +91,8 @@ static void ShowErrorPage(SSLPolicy* policy, SSLManager::CertError* error) { std::string html_text(jstemplate_builder::GetTemplateHtml(html, &strings, "template_root")); - WebContents* tab = error->GetWebContents(); + DCHECK(error->GetTabContents()->type() == TAB_CONTENTS_WEB); + WebContents* tab = error->GetTabContents()->AsWebContents(); int cert_id = CertStore::GetSharedInstance()->StoreCert( error->ssl_info().cert, tab->render_view_host()->process()->host_id()); std::string security_info = @@ -478,6 +481,7 @@ void SSLPolicy::OnFatalCertError(const GURL& main_frame_url, return; } error->CancelRequest(); + DCHECK(error->GetTabContents()->type() == TAB_CONTENTS_WEB); ShowErrorPage(this, error); // No need to degrade our security indicators because we didn't continue. } |