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

Unified Diff: chrome/browser/ssl/ssl_blocking_page.cc

Issue 113391: Refactor the inner classes from SSLManager to their own files to reduce the c... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 7 months 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/ssl/ssl_blocking_page.cc
===================================================================
--- chrome/browser/ssl/ssl_blocking_page.cc (revision 16018)
+++ chrome/browser/ssl/ssl_blocking_page.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/browser.h"
#include "chrome/browser/cert_store.h"
#include "chrome/browser/dom_operation_notification_details.h"
+#include "chrome/browser/ssl/ssl_cert_error_handler.h"
#include "chrome/browser/ssl/ssl_error_info.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
@@ -41,10 +42,10 @@
// Note that we always create a navigation entry with SSL errors.
// No error happening loading a sub-resource triggers an interstitial so far.
-SSLBlockingPage::SSLBlockingPage(SSLManager::CertError* error,
+SSLBlockingPage::SSLBlockingPage(SSLCertErrorHandler* handler,
Delegate* delegate)
- : InterstitialPage(error->GetTabContents(), true, error->request_url()),
- error_(error),
+ : InterstitialPage(handler->GetTabContents(), true, handler->request_url()),
+ handler_(handler),
delegate_(delegate),
delegate_has_been_notified_(false) {
RecordSSLBlockingPageStats(SHOW);
@@ -61,7 +62,7 @@
std::string SSLBlockingPage::GetHTMLContents() {
// Let's build the html error page.
DictionaryValue strings;
- SSLErrorInfo error_info = delegate_->GetSSLErrorInfo(error_);
+ SSLErrorInfo error_info = delegate_->GetSSLErrorInfo(handler_);
strings.SetString(L"title",
l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_TITLE));
strings.SetString(L"headLine", error_info.title());
@@ -88,7 +89,7 @@
}
void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) {
- const net::SSLInfo& ssl_info = error_->ssl_info();
+ const net::SSLInfo& ssl_info = handler_->ssl_info();
int cert_id = CertStore::GetSharedInstance()->StoreCert(
ssl_info.cert, tab()->render_view_host()->process()->pid());
@@ -130,14 +131,14 @@
void SSLBlockingPage::NotifyDenyCertificate() {
DCHECK(!delegate_has_been_notified_);
- delegate_->OnDenyCertificate(error_);
+ delegate_->OnDenyCertificate(handler_);
delegate_has_been_notified_ = true;
}
void SSLBlockingPage::NotifyAllowCertificate() {
DCHECK(!delegate_has_been_notified_);
- delegate_->OnAllowCertificate(error_);
+ delegate_->OnAllowCertificate(handler_);
delegate_has_been_notified_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698