| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_CLIENT_H_ | 5 #ifndef COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_CLIENT_H_ |
| 6 #define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_CLIENT_H_ | 6 #define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "components/security_state/security_state_model.h" | 10 #include "components/security_state/security_state_model.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class SecurityStateModelClient { | 21 class SecurityStateModelClient { |
| 22 public: | 22 public: |
| 23 SecurityStateModelClient() {} | 23 SecurityStateModelClient() {} |
| 24 virtual ~SecurityStateModelClient() {} | 24 virtual ~SecurityStateModelClient() {} |
| 25 | 25 |
| 26 // Retrieves the visible security state that is relevant to the | 26 // Retrieves the visible security state that is relevant to the |
| 27 // SecurityStateModel. | 27 // SecurityStateModel. |
| 28 virtual void GetVisibleSecurityState( | 28 virtual void GetVisibleSecurityState( |
| 29 SecurityStateModel::VisibleSecurityState* state) = 0; | 29 SecurityStateModel::VisibleSecurityState* state) = 0; |
| 30 | 30 |
| 31 // Returns the certificate used to load the page or request. | |
| 32 virtual bool RetrieveCert(scoped_refptr<net::X509Certificate>* cert) = 0; | |
| 33 | |
| 34 // Returns true if the page or request is known to be loaded with a | 31 // Returns true if the page or request is known to be loaded with a |
| 35 // certificate installed by the system administrator. | 32 // certificate installed by the system administrator. |
| 36 virtual bool UsedPolicyInstalledCertificate() = 0; | 33 virtual bool UsedPolicyInstalledCertificate() = 0; |
| 37 | 34 |
| 38 // Returns true if the given |url|'s origin should be considered secure. | 35 // Returns true if the given |url|'s origin should be considered secure. |
| 39 virtual bool IsOriginSecure(const GURL& url) = 0; | 36 virtual bool IsOriginSecure(const GURL& url) = 0; |
| 40 | 37 |
| 41 private: | 38 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(SecurityStateModelClient); | 39 DISALLOW_COPY_AND_ASSIGN(SecurityStateModelClient); |
| 43 }; | 40 }; |
| 44 | 41 |
| 45 } // namespace security_state | 42 } // namespace security_state |
| 46 | 43 |
| 47 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_CLIENT_H_ | 44 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_CLIENT_H_ |
| OLD | NEW |