1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ 6 #define CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ 7 8 #include "content/common/content_export.h" 9 #include "content/public/common/security_style.h" 10 #include "net/cert/cert_status_flags.h" 11 12 namespace content { 13 14 // Collects the SSL information for this NavigationEntry. 15 struct CONTENT_EXPORT SSLStatus { 16 // Flags used for the page security content status. 17 enum ContentStatusFlags { 18 // HTTP page, or HTTPS page with no insecure content. 19 NORMAL_CONTENT = 0, 20 21 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). 22 DISPLAYED_INSECURE_CONTENT = 1 << 0, 23 24 // HTTPS page containing "executed" HTTP resources (i.e. script). 25 // Also currently used for HTTPS page containing broken-HTTPS resources; 26 // this is wrong and should be fixed (see comments in 27 // SSLPolicy::OnRequestStarted()). 28 RAN_INSECURE_CONTENT = 1 << 1, 29 }; 30 31 SSLStatus(); 32 33 bool Equals(const SSLStatus& status) const { 34 return security_style == status.security_style && 35 cert_id == status.cert_id && 36 cert_status == status.cert_status && 37 security_bits == status.security_bits && 38 content_status == status.content_status; 39 } 40 41 content::SecurityStyle security_style; 42 int cert_id; 43 net::CertStatus cert_status; 44 int security_bits; 45 int connection_status; 46 // A combination of the ContentStatusFlags above. 47 int content_status; 48 }; 49 50 } // namespace content 51 52 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ 53