| Index: ios/chrome/browser/ssl/ios_security_state_tab_helper.h
|
| diff --git a/ios/chrome/browser/ssl/ios_security_state_tab_helper.h b/ios/chrome/browser/ssl/ios_security_state_tab_helper.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d1e6255cbf19f4ca7f0cb119022858d8c4206e29
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/ssl/ios_security_state_tab_helper.h
|
| @@ -0,0 +1,42 @@
|
| +// 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 IOS_CHROME_BROWSER_SSL_IOS_SECURITY_STATE_TAB_HELPER_H_
|
| +#define IOS_CHROME_BROWSER_SSL_IOS_SECURITY_STATE_TAB_HELPER_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
|
| +
|
| +// Uses a WebState to provide a SecurityStateModel with the
|
| +// information that it needs to determine the page's security status.
|
| +class IOSSecurityStateTabHelper
|
| + : public web::WebStateUserData<IOSSecurityStateTabHelper> {
|
| + public:
|
| + ~IOSSecurityStateTabHelper() override;
|
| +
|
| + void GetSecurityInfo(
|
| + security_state::SecurityStateModel::SecurityInfo* result) const;
|
| +
|
| + private:
|
| + explicit IOSSecurityStateTabHelper(web::WebState* web_state);
|
| + friend class web::WebStateUserData<IOSSecurityStateTabHelper>;
|
| +
|
| + 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(IOSSecurityStateTabHelper);
|
| +};
|
| +
|
| +#endif // IOS_CHROME_BROWSER_SSL_IOS_SECURITY_STATE_TAB_HELPER_H_
|
|
|