Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: ios/chrome/browser/ssl/ios_security_state_tab_helper.h

Issue 2448943002: Refactor SecurityStateModel/Clients for simplicity and reusability. (Closed)
Patch Set: update comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 IOS_CHROME_BROWSER_SSL_IOS_SECURITY_STATE_TAB_HELPER_H_
6 #define IOS_CHROME_BROWSER_SSL_IOS_SECURITY_STATE_TAB_HELPER_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 // Uses a WebState to provide a SecurityStateModel with the
19 // information that it needs to determine the page's security status.
20 class IOSSecurityStateTabHelper
21 : public web::WebStateUserData<IOSSecurityStateTabHelper> {
22 public:
23 ~IOSSecurityStateTabHelper() override;
24
25 void GetSecurityInfo(
26 security_state::SecurityStateModel::SecurityInfo* result) const;
27
28 private:
29 explicit IOSSecurityStateTabHelper(web::WebState* web_state);
30 friend class web::WebStateUserData<IOSSecurityStateTabHelper>;
31
32 std::unique_ptr<security_state::SecurityStateModel::VisibleSecurityState>
33 GetVisibleSecurityState() const;
34 bool UsedPolicyInstalledCertificate() const;
35
36 web::WebState* web_state_;
37 std::unique_ptr<security_state::SecurityStateModel> security_state_model_;
38
39 DISALLOW_COPY_AND_ASSIGN(IOSSecurityStateTabHelper);
40 };
41
42 #endif // IOS_CHROME_BROWSER_SSL_IOS_SECURITY_STATE_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698