summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl_policy.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-19 15:42:20 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-19 15:42:20 +0000
commiteb34392be36ea2948f39bd22a6beae19e0b0bd24 (patch)
treeb5b4e701a3c0e01cc4a2be2ac8c2b798c472cab6 /chrome/browser/ssl_policy.cc
parentd499ed582b58cf676becdc97ca7280861a9483b0 (diff)
downloadchromium_src-eb34392be36ea2948f39bd22a6beae19e0b0bd24.zip
chromium_src-eb34392be36ea2948f39bd22a6beae19e0b0bd24.tar.gz
chromium_src-eb34392be36ea2948f39bd22a6beae19e0b0bd24.tar.bz2
Factor the SSL state out of the main NavigationEntry into a helper class. This
makes it easier to find stuff and also copy ssl state (just assign). I made one "real" change in web_contents where I copy the entire SSL state now to the new entry rather than just a few fields like the old one. I couldn't figure out why this was necessary: running it shows that this leaves the other two fields in the uninitialized state which seems wrong. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl_policy.cc')
-rw-r--r--chrome/browser/ssl_policy.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/ssl_policy.cc b/chrome/browser/ssl_policy.cc
index 1ae9ae1..dd83357 100644
--- a/chrome/browser/ssl_policy.cc
+++ b/chrome/browser/ssl_policy.cc
@@ -345,7 +345,7 @@ class DefaultPolicy : public SSLPolicy {
mixed_content_handler->StartRequest(filter_policy);
NavigationEntry* entry = navigation_controller->GetActiveEntry();
- entry->SetHasMixedContent();
+ entry->ssl().set_has_mixed_content();
navigation_controller->EntryUpdated(entry);
}
@@ -409,9 +409,10 @@ void SSLPolicy::OnRequestStarted(SSLManager* manager, const GURL& url,
return;
}
+ NavigationEntry::SSLStatus& ssl = entry->ssl();
if (!entry->GetURL().SchemeIsSecure() || // Current page is not secure.
resource_type == ResourceType::MAIN_FRAME || // Main frame load.
- net::IsCertStatusError(entry->GetSSLCertStatus())) { // There is already
+ net::IsCertStatusError(ssl.cert_status())) { // There is already
// an error for the main page, don't report sub-resources as unsafe
// content.
// No mixed/unsafe content check necessary.
@@ -428,8 +429,8 @@ void SSLPolicy::OnRequestStarted(SSLManager* manager, const GURL& url,
// net::IsCertStatusError(ssl_cert_status)) {
if (net::IsCertStatusError(ssl_cert_status)) {
// The resource is unsafe.
- if (!entry->HasUnsafeContent()) {
- entry->SetHasUnsafeContent();
+ if (!ssl.has_unsafe_content()) {
+ ssl.set_has_unsafe_content();
manager->SetMaxSecurityStyle(SECURITY_STYLE_AUTHENTICATION_BROKEN);
}
}
@@ -443,7 +444,7 @@ void SSLPolicy::OnRequestStarted(SSLManager* manager, const GURL& url,
// Now check for mixed content.
if (entry->GetURL().SchemeIsSecure() && !url.SchemeIsSecure()) {
- entry->SetHasMixedContent();
+ ssl.set_has_mixed_content();
const std::wstring& msg = l10n_util::GetStringF(
IDS_MIXED_CONTENT_LOG_MESSAGE,
UTF8ToWide(entry->GetURL().spec()),