| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 public: | 47 public: |
| 48 AwSSLHostStateDelegate(); | 48 AwSSLHostStateDelegate(); |
| 49 ~AwSSLHostStateDelegate() override; | 49 ~AwSSLHostStateDelegate() override; |
| 50 | 50 |
| 51 // Records that |cert| is permitted to be used for |host| in the future, for | 51 // Records that |cert| is permitted to be used for |host| in the future, for |
| 52 // a specified |error| type. | 52 // a specified |error| type. |
| 53 void AllowCert(const std::string& host, | 53 void AllowCert(const std::string& host, |
| 54 const net::X509Certificate& cert, | 54 const net::X509Certificate& cert, |
| 55 net::CertStatus error) override; | 55 net::CertStatus error) override; |
| 56 | 56 |
| 57 void Clear() override; | 57 void Clear( |
| 58 const base::Callback<bool(const std::string&)>& host_filter) override; |
| 58 | 59 |
| 59 // Queries whether |cert| is allowed or denied for |host| and |error|. | 60 // Queries whether |cert| is allowed or denied for |host| and |error|. |
| 60 content::SSLHostStateDelegate::CertJudgment QueryPolicy( | 61 content::SSLHostStateDelegate::CertJudgment QueryPolicy( |
| 61 const std::string& host, | 62 const std::string& host, |
| 62 const net::X509Certificate& cert, | 63 const net::X509Certificate& cert, |
| 63 net::CertStatus error, | 64 net::CertStatus error, |
| 64 bool* expired_previous_decision) override; | 65 bool* expired_previous_decision) override; |
| 65 | 66 |
| 66 // Records that a host has run insecure content. | 67 // Records that a host has run insecure content. |
| 67 void HostRanInsecureContent(const std::string& host, | 68 void HostRanInsecureContent(const std::string& host, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 87 private: | 88 private: |
| 88 // Certificate policies for each host. | 89 // Certificate policies for each host. |
| 89 std::map<std::string, internal::CertPolicy> cert_policy_for_host_; | 90 std::map<std::string, internal::CertPolicy> cert_policy_for_host_; |
| 90 | 91 |
| 91 DISALLOW_COPY_AND_ASSIGN(AwSSLHostStateDelegate); | 92 DISALLOW_COPY_AND_ASSIGN(AwSSLHostStateDelegate); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } // namespace android_webview | 95 } // namespace android_webview |
| 95 | 96 |
| 96 #endif // ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ | 97 #endif // ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ |
| OLD | NEW |