| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 COMPONENTS_SECURITY_STATE_IOS_IOS_SECURITY_STATE_MODEL_H_ |
| 6 #define COMPONENTS_SECURITY_STATE_IOS_IOS_SECURITY_STATE_MODEL_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "components/security_state/core/security_state_model.h" |
| 12 #include "ios/web/public/web_state/web_state_user_data.h" |
| 13 |
| 14 namespace web { |
| 15 class WebState; |
| 16 } // namespace web |
| 17 |
| 18 namespace security_state { |
| 19 |
| 20 // Uses a WebState to provide a SecurityStateModel with the |
| 21 // information that it needs to determine the page's security status. |
| 22 class IOSSecurityStateModel |
| 23 : public web::WebStateUserData<IOSSecurityStateModel> { |
| 24 public: |
| 25 ~IOSSecurityStateModel() override; |
| 26 |
| 27 void GetSecurityInfo( |
| 28 security_state::SecurityStateModel::SecurityInfo* result) const; |
| 29 |
| 30 private: |
| 31 explicit IOSSecurityStateModel(web::WebState* web_state); |
| 32 friend class web::WebStateUserData<IOSSecurityStateModel>; |
| 33 |
| 34 std::unique_ptr<security_state::SecurityStateModel::VisibleSecurityState> |
| 35 GetVisibleSecurityState() const; |
| 36 bool UsedPolicyInstalledCertificate() const; |
| 37 |
| 38 web::WebState* web_state_; |
| 39 std::unique_ptr<security_state::SecurityStateModel> security_state_model_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(IOSSecurityStateModel); |
| 42 }; |
| 43 |
| 44 } // namespace security_state |
| 45 |
| 46 #endif // COMPONENTS_SECURITY_STATE_IOS_IOS_SECURITY_STATE_MODEL_H_ |
| OLD | NEW |