| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // default strategy of not remembering decisions at all. | 26 // default strategy of not remembering decisions at all. |
| 27 class SSLHostStateDelegate { | 27 class SSLHostStateDelegate { |
| 28 public: | 28 public: |
| 29 // The judgements that can be reached by a user for invalid certificates. | 29 // The judgements that can be reached by a user for invalid certificates. |
| 30 enum CertJudgment { | 30 enum CertJudgment { |
| 31 DENIED, | 31 DENIED, |
| 32 ALLOWED | 32 ALLOWED |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 // The types of nonsecure subresources that this class keeps track of. | 35 // The types of nonsecure subresources that this class keeps track of. |
| 36 // | |
| 37 // TODO(estark): Currently, MIXED_CONTENT is used for all insecure | |
| 38 // content, as SSLManager/SSLPolicy do not separate signals for mixed | |
| 39 // content from signals for subresources with cert errors. Fixing this | |
| 40 // is in progress as part of https://crbug.com/634171. | |
| 41 enum InsecureContentType { | 36 enum InsecureContentType { |
| 42 // A MIXED subresource was loaded over HTTP on an HTTPS page. | 37 // A MIXED subresource was loaded over HTTP on an HTTPS page. |
| 43 MIXED_CONTENT, | 38 MIXED_CONTENT, |
| 44 // A CERT_ERRORS subresource was loaded over HTTPS with certificate | 39 // A CERT_ERRORS subresource was loaded over HTTPS with certificate |
| 45 // errors on an HTTPS page. | 40 // errors on an HTTPS page. |
| 46 CERT_ERRORS_CONTENT, | 41 CERT_ERRORS_CONTENT, |
| 47 }; | 42 }; |
| 48 | 43 |
| 49 // Records that |cert| is permitted to be used for |host| in the future, for | 44 // Records that |cert| is permitted to be used for |host| in the future, for |
| 50 // a specified |error| type. | 45 // a specified |error| type. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // error combination exception is allowed, use QueryPolicy(). | 82 // error combination exception is allowed, use QueryPolicy(). |
| 88 virtual bool HasAllowException(const std::string& host) const = 0; | 83 virtual bool HasAllowException(const std::string& host) const = 0; |
| 89 | 84 |
| 90 protected: | 85 protected: |
| 91 virtual ~SSLHostStateDelegate() {} | 86 virtual ~SSLHostStateDelegate() {} |
| 92 }; | 87 }; |
| 93 | 88 |
| 94 } // namespace content | 89 } // namespace content |
| 95 | 90 |
| 96 #endif // CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ | 91 #endif // CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ |
| OLD | NEW |