| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 // Queries whether |cert| is allowed or denied for |host| and |error|. | 59 // Queries whether |cert| is allowed or denied for |host| and |error|. |
| 60 content::SSLHostStateDelegate::CertJudgment QueryPolicy( | 60 content::SSLHostStateDelegate::CertJudgment QueryPolicy( |
| 61 const std::string& host, | 61 const std::string& host, |
| 62 const net::X509Certificate& cert, | 62 const net::X509Certificate& cert, |
| 63 net::CertStatus error, | 63 net::CertStatus error, |
| 64 bool* expired_previous_decision) override; | 64 bool* expired_previous_decision) override; |
| 65 | 65 |
| 66 // Records that a host has run insecure content. | 66 // Records that a host has run insecure content. |
| 67 void HostRanInsecureContent(const std::string& host, | 67 void HostRanInsecureContent(const std::string& host, |
| 68 int pid, | 68 int child_id, |
| 69 InsecureContentType content_type) override; | 69 InsecureContentType content_type) override; |
| 70 | 70 |
| 71 // Returns whether the specified host ran insecure content. | 71 // Returns whether the specified host ran insecure content. |
| 72 bool DidHostRunInsecureContent( | 72 bool DidHostRunInsecureContent( |
| 73 const std::string& host, | 73 const std::string& host, |
| 74 int pid, | 74 int child_id, |
| 75 InsecureContentType content_type) const override; | 75 InsecureContentType content_type) const override; |
| 76 | 76 |
| 77 // Revokes all SSL certificate error allow exceptions made by the user for | 77 // Revokes all SSL certificate error allow exceptions made by the user for |
| 78 // |host|. | 78 // |host|. |
| 79 void RevokeUserAllowExceptions(const std::string& host) override; | 79 void RevokeUserAllowExceptions(const std::string& host) override; |
| 80 | 80 |
| 81 // Returns whether the user has allowed a certificate error exception for | 81 // Returns whether the user has allowed a certificate error exception for |
| 82 // |host|. This does not mean that *all* certificate errors are allowed, just | 82 // |host|. This does not mean that *all* certificate errors are allowed, just |
| 83 // that there exists an exception. To see if a particular certificate and | 83 // that there exists an exception. To see if a particular certificate and |
| 84 // error combination exception is allowed, use QueryPolicy(). | 84 // error combination exception is allowed, use QueryPolicy(). |
| 85 bool HasAllowException(const std::string& host) const override; | 85 bool HasAllowException(const std::string& host) const override; |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 // Certificate policies for each host. | 88 // Certificate policies for each host. |
| 89 std::map<std::string, internal::CertPolicy> cert_policy_for_host_; | 89 std::map<std::string, internal::CertPolicy> cert_policy_for_host_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(AwSSLHostStateDelegate); | 91 DISALLOW_COPY_AND_ASSIGN(AwSSLHostStateDelegate); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace android_webview | 94 } // namespace android_webview |
| 95 | 95 |
| 96 #endif // ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ | 96 #endif // ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ |
| OLD | NEW |