| Index: components/security_state/ios/ios_security_state_model.h
|
| diff --git a/components/security_state/ios/ios_security_state_model.h b/components/security_state/ios/ios_security_state_model.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e1966c92c4dc81663469323349f61a3af8ccfd3e
|
| --- /dev/null
|
| +++ b/components/security_state/ios/ios_security_state_model.h
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_SECURITY_STATE_IOS_IOS_SECURITY_STATE_MODEL_H_
|
| +#define COMPONENTS_SECURITY_STATE_IOS_IOS_SECURITY_STATE_MODEL_H_
|
| +
|
| +#include <memory>
|
| +
|
| +#include "base/macros.h"
|
| +#include "components/security_state/core/security_state_model.h"
|
| +#include "ios/web/public/web_state/web_state_user_data.h"
|
| +
|
| +namespace web {
|
| +class WebState;
|
| +} // namespace web
|
| +
|
| +namespace security_state {
|
| +
|
| +// Uses a WebState to provide a SecurityStateModel with the
|
| +// information that it needs to determine the page's security status.
|
| +class IOSSecurityStateModel
|
| + : public web::WebStateUserData<IOSSecurityStateModel> {
|
| + public:
|
| + ~IOSSecurityStateModel() override;
|
| +
|
| + void GetSecurityInfo(
|
| + security_state::SecurityStateModel::SecurityInfo* result) const;
|
| +
|
| + private:
|
| + explicit IOSSecurityStateModel(web::WebState* web_state);
|
| + friend class web::WebStateUserData<IOSSecurityStateModel>;
|
| +
|
| + std::unique_ptr<security_state::SecurityStateModel::VisibleSecurityState>
|
| + GetVisibleSecurityState() const;
|
| + bool UsedPolicyInstalledCertificate() const;
|
| +
|
| + web::WebState* web_state_;
|
| + std::unique_ptr<security_state::SecurityStateModel> security_state_model_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(IOSSecurityStateModel);
|
| +};
|
| +
|
| +} // namespace security_state
|
| +
|
| +#endif // COMPONENTS_SECURITY_STATE_IOS_IOS_SECURITY_STATE_MODEL_H_
|
|
|