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

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: Remove SecurityStateModel. 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 "ios/web/public/web_state/web_state_user_data.h"
12
13 namespace security_state {
14 struct SecurityInfo;
15 struct VisibleSecurityState;
16 } // namespace security_state
17
18 namespace web {
19 class WebState;
20 } // namespace web
21
22 // Tab helper that provides the page's security status. Uses a WebState to
23 // provide a security_state::GetSecurityInfo() with the relevant
24 // VisibleSecurityState information.
25 class IOSSecurityStateTabHelper
26 : public web::WebStateUserData<IOSSecurityStateTabHelper> {
27 public:
28 ~IOSSecurityStateTabHelper() override;
29
30 void GetSecurityInfo(security_state::SecurityInfo* result) const;
31
32 private:
33 explicit IOSSecurityStateTabHelper(web::WebState* web_state);
34 friend class web::WebStateUserData<IOSSecurityStateTabHelper>;
35
36 std::unique_ptr<security_state::VisibleSecurityState>
37 GetVisibleSecurityState() const;
38
39 web::WebState* web_state_;
40
41 DISALLOW_COPY_AND_ASSIGN(IOSSecurityStateTabHelper);
42 };
43
44 #endif // IOS_CHROME_BROWSER_SSL_IOS_SECURITY_STATE_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698