Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Side by Side Diff: ios/web/public/ssl_status.h

Issue 2466143002: iOS: Mark HTTP pages with password fields with an omnibox icon. (Closed)
Patch Set: iOS HTTP Bad. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 DISPLAYED_PASSWORD_FIELD_ON_HTTP = 1 << 4,
estark 2016/11/29 21:28:48 nit: add a comment explaining
lgarron 2016/12/02 01:21:52 Done. (I based the wording off the desktop constan
28 }; 30 };
29 31
30 SSLStatus(); 32 SSLStatus();
31 SSLStatus(const SSLStatus& other); 33 SSLStatus(const SSLStatus& other);
32 ~SSLStatus(); 34 ~SSLStatus();
33 35
34 bool Equals(const SSLStatus& status) const { 36 bool Equals(const SSLStatus& status) const {
35 return security_style == status.security_style && 37 return security_style == status.security_style &&
36 !!certificate == !!status.certificate && 38 !!certificate == !!status.certificate &&
37 (certificate ? certificate->Equals(status.certificate.get()) 39 (certificate ? certificate->Equals(status.certificate.get())
(...skipping 14 matching lines...) Expand all
52 // Host which was used for |cert_status| calculation. It is not an actual part 54 // 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. 55 // 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 56 // Used to check if |cert_status| is still valid or needs to be recalculated
55 // (e.g. after redirect). 57 // (e.g. after redirect).
56 std::string cert_status_host; 58 std::string cert_status_host;
57 }; 59 };
58 60
59 } // namespace web 61 } // namespace web
60 62
61 #endif // IOS_WEB_PUBLIC_SSL_STATUS_H_ 63 #endif // IOS_WEB_PUBLIC_SSL_STATUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698