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

Unified Diff: chrome/browser/ssl/chrome_security_state_model_client.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: chrome/browser/ssl/chrome_security_state_model_client.cc
diff --git a/chrome/browser/ssl/chrome_security_state_model_client.cc b/chrome/browser/ssl/chrome_security_state_model_client.cc
index 943b3a8f211ac5640ab495f6df5ac3f38b928518..d0519e1dd806ba44834235c232749152aefc157b 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client.cc
+++ b/chrome/browser/ssl/chrome_security_state_model_client.cc
@@ -40,31 +40,6 @@ using security_state::SecurityStateModel;
namespace {
-// Converts a content::SecurityStyle (an indicator of a request's
-// overall security level computed by //content) into a
-// SecurityStateModel::SecurityLevel (a finer-grained SecurityStateModel
-// concept that can express all of SecurityStateModel's policies that
-// //content doesn't necessarily know about).
-SecurityStateModel::SecurityLevel GetSecurityLevelForSecurityStyle(
- content::SecurityStyle style) {
- switch (style) {
- case content::SECURITY_STYLE_UNKNOWN:
- NOTREACHED();
- return SecurityStateModel::NONE;
- case content::SECURITY_STYLE_UNAUTHENTICATED:
- return SecurityStateModel::NONE;
- case content::SECURITY_STYLE_AUTHENTICATION_BROKEN:
- return SecurityStateModel::DANGEROUS;
- case content::SECURITY_STYLE_WARNING:
- // content currently doesn't use this style.
- NOTREACHED();
- return SecurityStateModel::SECURITY_WARNING;
- case content::SECURITY_STYLE_AUTHENTICATED:
- return SecurityStateModel::SECURE;
- }
- return SecurityStateModel::NONE;
-}
-
// Note: This is a lossy operation. Not all of the policies that can be
// expressed by a SecurityLevel (a //chrome concept) can be expressed by
// a content::SecurityStyle.
@@ -182,7 +157,6 @@ void CheckSafeBrowsingStatus(content::NavigationEntry* entry,
if (sb_ui_manager->IsUrlWhitelistedOrPendingForWebContents(
entry->GetURL(), false, entry, web_contents, false)) {
state->fails_malware_check = true;
- state->initial_security_level = SecurityStateModel::DANGEROUS;
}
}
@@ -325,16 +299,6 @@ void ChromeSecurityStateModelClient::GetSecurityInfo(
security_state_model_->GetSecurityInfo(result);
}
-bool ChromeSecurityStateModelClient::RetrieveCert(
- scoped_refptr<net::X509Certificate>* cert) {
- content::NavigationEntry* entry =
- web_contents_->GetController().GetVisibleEntry();
- if (!entry || !entry->GetSSL().certificate)
- return false;
- *cert = entry->GetSSL().certificate;
- return true;
-}
-
bool ChromeSecurityStateModelClient::UsedPolicyInstalledCertificate() {
#if defined(OS_CHROMEOS)
policy::PolicyCertService* service =
@@ -359,7 +323,7 @@ void ChromeSecurityStateModelClient::GetVisibleSecurityState(
return;
}
- if (entry->GetSSL().security_style == content::SECURITY_STYLE_UNKNOWN) {
+ if (!entry->GetSSL().initialized) {
*state = SecurityStateModel::VisibleSecurityState();
// Connection security information is still being initialized, but malware
// status might already be known.
@@ -370,8 +334,6 @@ void ChromeSecurityStateModelClient::GetVisibleSecurityState(
state->connection_info_initialized = true;
state->url = entry->GetURL();
const content::SSLStatus& ssl = entry->GetSSL();
- state->initial_security_level =
- GetSecurityLevelForSecurityStyle(ssl.security_style);
state->certificate = ssl.certificate;
state->cert_status = ssl.cert_status;
state->connection_status = ssl.connection_status;

Powered by Google App Engine
This is Rietveld 408576698