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

Unified Diff: content/browser/ssl/ssl_manager.cc

Issue 2400673003: Remove SSLStatus::security_style member and content::SecurityStyle (Closed)
Patch Set: Created 4 years, 2 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: content/browser/ssl/ssl_manager.cc
diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc
index bc38ee4b0c42a0dc891eafef5bb7f60d5adf6222..ae406f0820046c774d7e63cc64a917f51dff5ac9 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -16,7 +16,6 @@
#include "content/browser/loader/resource_request_info_impl.h"
#include "content/browser/ssl/ssl_error_handler.h"
#include "content/browser/web_contents/web_contents_impl.h"
-#include "content/common/security_style_util.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/certificate_request_result_type.h"
@@ -343,17 +342,13 @@ void SSLManager::UpdateEntry(NavigationEntryImpl* entry) {
return;
SSLStatus original_ssl_status = entry->GetSSL(); // Copy!
-
- // Initialize the entry with an initial SecurityStyle if needed.
- if (entry->GetSSL().security_style == SECURITY_STYLE_UNKNOWN) {
- entry->GetSSL().security_style = GetSecurityStyleForResource(
- entry->GetURL(), !!entry->GetSSL().certificate,
- entry->GetSSL().cert_status);
- }
+ entry->GetSSL().initialized = true;
WebContentsImpl* web_contents_impl =
static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents());
- if (entry->GetSSL().security_style == SECURITY_STYLE_UNAUTHENTICATED)
+ // Do not record information about insecure subresources if the main
+ // page is HTTP or HTTPS without a certificate.
+ if (!entry->GetURL().SchemeIsCryptographic() || !entry->GetSSL().certificate)
return;
// Update the entry's flags for insecure content.
@@ -376,7 +371,6 @@ void SSLManager::UpdateEntry(NavigationEntryImpl* entry) {
ssl_host_state_delegate_->DidHostRunInsecureContent(
entry->GetURL().host(), site_instance->GetProcess()->GetID(),
SSLHostStateDelegate::MIXED_CONTENT)) {
- entry->GetSSL().security_style = SECURITY_STYLE_AUTHENTICATION_BROKEN;
entry->GetSSL().content_status |= SSLStatus::RAN_INSECURE_CONTENT;
}
@@ -384,7 +378,6 @@ void SSLManager::UpdateEntry(NavigationEntryImpl* entry) {
ssl_host_state_delegate_->DidHostRunInsecureContent(
entry->GetURL().host(), site_instance->GetProcess()->GetID(),
SSLHostStateDelegate::CERT_ERRORS_CONTENT)) {
- entry->GetSSL().security_style = SECURITY_STYLE_AUTHENTICATION_BROKEN;
entry->GetSSL().content_status |= SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS;
}

Powered by Google App Engine
This is Rietveld 408576698