| 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 IOS_WEB_PUBLIC_SSL_STATUS_H_ | 5 #ifndef IOS_WEB_PUBLIC_SSL_STATUS_H_ |
| 6 #define IOS_WEB_PUBLIC_SSL_STATUS_H_ | 6 #define IOS_WEB_PUBLIC_SSL_STATUS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ios/web/public/security_style.h" | 10 #include "ios/web/public/security_style.h" |
| 11 #include "net/cert/cert_status_flags.h" | 11 #include "net/cert/cert_status_flags.h" |
| 12 #include "net/cert/x509_certificate.h" | 12 #include "net/cert/x509_certificate.h" |
| 13 | 13 |
| 14 namespace web { | 14 namespace web { |
| 15 | 15 |
| 16 // Collects the SSL information for this NavigationItem. | 16 // Collects the SSL information for this NavigationItem. |
| 17 struct SSLStatus { | 17 struct SSLStatus { |
| 18 // Flags used for the page security content status. | 18 // Flags used for the page security content status. |
| 19 enum ContentStatusFlags { | 19 enum ContentStatusFlags { |
| 20 // HTTP page, or HTTPS page with no insecure content. | 20 // HTTP page, or HTTPS page with no insecure content. |
| 21 NORMAL_CONTENT = 0, | 21 NORMAL_CONTENT = 0, |
| 22 | 22 |
| 23 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). | 23 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). |
| 24 DISPLAYED_INSECURE_CONTENT = 1 << 0, | 24 DISPLAYED_INSECURE_CONTENT = 1 << 0, |
| 25 | 25 |
| 26 // The RAN_INSECURE_CONTENT flag is intentionally omitted on iOS because | 26 // The RAN_INSECURE_CONTENT flag is intentionally omitted on iOS because |
| 27 // there is no way to tell when insecure content is run in a web view. | 27 // there is no way to tell when insecure content is run in a web view. |
| 28 |
| 29 // HTTP page containing a password input, used to adjust UI on nonsecure |
| 30 // pages that collect sensitive data. |
| 31 DISPLAYED_PASSWORD_FIELD_ON_HTTP = 1 << 4, |
| 28 }; | 32 }; |
| 29 | 33 |
| 30 SSLStatus(); | 34 SSLStatus(); |
| 31 SSLStatus(const SSLStatus& other); | 35 SSLStatus(const SSLStatus& other); |
| 32 ~SSLStatus(); | 36 ~SSLStatus(); |
| 33 | 37 |
| 34 bool Equals(const SSLStatus& status) const { | 38 bool Equals(const SSLStatus& status) const { |
| 35 return security_style == status.security_style && | 39 return security_style == status.security_style && |
| 36 !!certificate == !!status.certificate && | 40 !!certificate == !!status.certificate && |
| 37 (certificate ? certificate->Equals(status.certificate.get()) | 41 (certificate ? certificate->Equals(status.certificate.get()) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 52 // Host which was used for |cert_status| calculation. It is not an actual part | 56 // Host which was used for |cert_status| calculation. It is not an actual part |
| 53 // of SSL status, hence it's not taken into account in |Equals| method. | 57 // of SSL status, hence it's not taken into account in |Equals| method. |
| 54 // Used to check if |cert_status| is still valid or needs to be recalculated | 58 // Used to check if |cert_status| is still valid or needs to be recalculated |
| 55 // (e.g. after redirect). | 59 // (e.g. after redirect). |
| 56 std::string cert_status_host; | 60 std::string cert_status_host; |
| 57 }; | 61 }; |
| 58 | 62 |
| 59 } // namespace web | 63 } // namespace web |
| 60 | 64 |
| 61 #endif // IOS_WEB_PUBLIC_SSL_STATUS_H_ | 65 #endif // IOS_WEB_PUBLIC_SSL_STATUS_H_ |
| OLD | NEW |