Index: chrome/browser/ui/website_settings/website_settings.h |
diff --git a/chrome/browser/ui/website_settings/website_settings.h b/chrome/browser/ui/website_settings/website_settings.h |
index e27d8571ae6bb52e86765be4579d5a70a6a02656..fdfa003e926fcc9cb64e58102158ca06107b0fc3 100644 |
--- a/chrome/browser/ui/website_settings/website_settings.h |
+++ b/chrome/browser/ui/website_settings/website_settings.h |
@@ -66,9 +66,22 @@ class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver { |
SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT, |
}; |
+ // Validation status of a website's certificate via Certificate Transparency. |
+ enum CertTransparencyStatus { |
+ // No status about the website's certificate is available. |
+ CERT_TRANSPARENCY_STATUS_UNKNOWN = 0, |
+ // One or more SCTs present, none verified. |
+ CERT_TRANSPARENCY_STATUS_HAS_SCT, |
+ // One or more valid SCTs were presented for the server's certificate. |
+ CERT_TRANSPARENCY_STATUS_HAS_VALID_SCT, |
+ // XXX(rsleevi): Do we also plan to track "Presented SCTs, but none valid?" |
+ // or "Presented SCTs, but not by any trusted logs" (etc). |
+ }; |
+ |
// Creates a WebsiteSettings for the passed |url| using the given |ssl| status |
// object to determine the status of the site's connection. The |
// |WebsiteSettings| takes ownership of the |ui|. |
+ // XXX(rsleevi): Pass through the SCT store. |
WebsiteSettings(WebsiteSettingsUI* ui, |
Profile* profile, |
TabSpecificContentSettings* tab_specific_content_settings, |
@@ -113,6 +126,10 @@ class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver { |
return organization_name_; |
} |
+ string16 cert_transparency_details() const { |
+ return cert_transparency_details_; |
+ } |
+ |
// SiteDataObserver implementation. |
virtual void OnSiteDataAccessed() OVERRIDE; |
@@ -164,6 +181,8 @@ class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver { |
// Status of the connection to the website. |
SiteConnectionStatus site_connection_status_; |
+ CertTransparencyStatus cert_transparency_status_; |
+ |
// TODO(markusheintz): Move the creation of all the string16 typed UI |
// strings below to the corresponding UI code, in order to prevent |
// unnecessary UTF-8 string conversions. |
@@ -185,6 +204,11 @@ class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver { |
// the UI. |
string16 organization_name_; |
+ // For websites that were successfully checked using Certificate |
+ // Transparency, contains a description about the validation status and which |
+ // logs were used. This string will be displayed in the UI. |
+ string16 cert_transparency_details_; |
+ |
// The |CertStore| provides all X509Certificates. |
content::CertStore* cert_store_; |