Index: components/security_state/core/security_state_model.h |
diff --git a/components/security_state/security_state_model.h b/components/security_state/core/security_state_model.h |
similarity index 91% |
rename from components/security_state/security_state_model.h |
rename to components/security_state/core/security_state_model.h |
index 235c6b5e224211fe15b3e8b59c893d6fda2f05e4..5647258aee28f6047c9b53e1f7528dc1951d7197 100644 |
--- a/components/security_state/security_state_model.h |
+++ b/components/security_state/core/security_state_model.h |
@@ -6,7 +6,9 @@ |
#define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
#include <stdint.h> |
+#include <memory> |
+#include "base/callback.h" |
#include "base/macros.h" |
#include "net/cert/cert_status_flags.h" |
#include "net/cert/sct_status_flags.h" |
@@ -15,8 +17,6 @@ |
namespace security_state { |
-class SecurityStateModelClient; |
- |
// SecurityStateModel provides high-level security information about a |
// page or request. |
// |
@@ -144,7 +144,7 @@ class SecurityStateModel { |
// Contains the security state relevant to computing the SecurityInfo |
// for a page. This is the input to GetSecurityInfo() provided by the |
- // model's client. |
+ // model's user. |
struct VisibleSecurityState { |
VisibleSecurityState(); |
~VisibleSecurityState(); |
@@ -194,14 +194,22 @@ class SecurityStateModel { |
SecurityStateModel(); |
virtual ~SecurityStateModel(); |
- // Populates |result| to describe the current page. |
- void GetSecurityInfo(SecurityInfo* result) const; |
+ // Returns true if the given |url|'s origin should be considered secure. |
+ using IsOriginSecureCallback = base::Callback<bool(const GURL& url)>; |
- void SetClient(SecurityStateModelClient* client); |
+ // Populates |result| to describe the current page. |
+ // |visible_security_state| contains the relevant security state. |
+ // |used_policy_installed_certificate| indicates whether the page or request |
+ // is known to be loaded with a certificate installed by the system admin. |
+ // |is_origin_secure_callback| determines whether a URL's origin should be |
+ // considered secure. |
+ void GetSecurityInfo( |
+ SecurityInfo* result, |
estark
2016/11/03 04:38:45
optional nit: I think putting the output parameter
Eric Seckler
2016/11/03 17:01:06
Done.
|
+ std::unique_ptr<VisibleSecurityState> visible_security_state, |
+ bool used_policy_installed_certificate, |
+ IsOriginSecureCallback is_origin_secure_callback) const; |
private: |
- SecurityStateModelClient* client_; |
- |
DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); |
}; |