summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl_policy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ssl_policy.cc')
-rw-r--r--chrome/browser/ssl_policy.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/chrome/browser/ssl_policy.cc b/chrome/browser/ssl_policy.cc
index 8ed4486..f89cdcd 100644
--- a/chrome/browser/ssl_policy.cc
+++ b/chrome/browser/ssl_policy.cc
@@ -61,9 +61,7 @@ ShowUnsafeContentTask::~ShowUnsafeContentTask() {
void ShowUnsafeContentTask::Run() {
error_handler_->manager()->AllowShowInsecureContentForURL(main_frame_url_);
// Reload the page.
- DCHECK(error_handler_->GetTabContents()->type() == TAB_CONTENTS_WEB);
- WebContents* tab = error_handler_->GetTabContents()->AsWebContents();
- tab->controller()->Reload(true);
+ error_handler_->GetWebContents()->controller()->Reload(true);
}
static void ShowErrorPage(SSLPolicy* policy, SSLManager::CertError* error) {
@@ -91,8 +89,7 @@ static void ShowErrorPage(SSLPolicy* policy, SSLManager::CertError* error) {
std::string html_text(jstemplate_builder::GetTemplateHtml(html, &strings,
"template_root"));
- DCHECK(error->GetTabContents()->type() == TAB_CONTENTS_WEB);
- WebContents* tab = error->GetTabContents()->AsWebContents();
+ WebContents* tab = error->GetWebContents();
int cert_id = CertStore::GetSharedInstance()->StoreCert(
error->ssl_info().cert, tab->render_view_host()->process()->host_id());
std::string security_info =
@@ -481,7 +478,6 @@ 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.
}