OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IOS_CHROME_BROWSER_SSL_IOS_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ | 5 #ifndef IOS_CHROME_BROWSER_SSL_IOS_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ |
6 #define IOS_CHROME_BROWSER_SSL_IOS_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ | 6 #define IOS_CHROME_BROWSER_SSL_IOS_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "components/security_state/security_state_model.h" | 11 #include "components/security_state/security_state_model.h" |
11 #include "components/security_state/security_state_model_client.h" | 12 #include "components/security_state/security_state_model_client.h" |
12 #include "ios/web/public/web_state/web_state_user_data.h" | 13 #include "ios/web/public/web_state/web_state_user_data.h" |
13 | 14 |
14 namespace web { | 15 namespace web { |
15 class WebState; | 16 class WebState; |
16 } // namespace web | 17 } // namespace web |
17 | 18 |
18 // Uses a WebState to provide a SecurityStateModel with the | 19 // Uses a WebState to provide a SecurityStateModel with the |
19 // information that it needs to determine the page's security status. | 20 // information that it needs to determine the page's security status. |
(...skipping 11 matching lines...) Expand all Loading... |
31 security_state::SecurityStateModel::VisibleSecurityState* state) override; | 32 security_state::SecurityStateModel::VisibleSecurityState* state) override; |
32 bool RetrieveCert(scoped_refptr<net::X509Certificate>* cert) override; | 33 bool RetrieveCert(scoped_refptr<net::X509Certificate>* cert) override; |
33 bool UsedPolicyInstalledCertificate() override; | 34 bool UsedPolicyInstalledCertificate() override; |
34 bool IsOriginSecure(const GURL& url) override; | 35 bool IsOriginSecure(const GURL& url) override; |
35 | 36 |
36 private: | 37 private: |
37 explicit IOSChromeSecurityStateModelClient(web::WebState* web_state); | 38 explicit IOSChromeSecurityStateModelClient(web::WebState* web_state); |
38 friend class web::WebStateUserData<IOSChromeSecurityStateModelClient>; | 39 friend class web::WebStateUserData<IOSChromeSecurityStateModelClient>; |
39 | 40 |
40 web::WebState* web_state_; | 41 web::WebState* web_state_; |
41 scoped_ptr<security_state::SecurityStateModel> security_state_model_; | 42 std::unique_ptr<security_state::SecurityStateModel> security_state_model_; |
42 | 43 |
43 DISALLOW_COPY_AND_ASSIGN(IOSChromeSecurityStateModelClient); | 44 DISALLOW_COPY_AND_ASSIGN(IOSChromeSecurityStateModelClient); |
44 }; | 45 }; |
45 | 46 |
46 #endif // IOS_CHROME_BROWSER_SSL_IOS_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ | 47 #endif // IOS_CHROME_BROWSER_SSL_IOS_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ |
OLD | NEW |