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

Unified Diff: components/security_state/security_state_model.h

Issue 2481743009: Expose malware/phishing/etc. distinction from SafeBrowsingUIManager (Closed)
Patch Set: fix tests Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: components/security_state/security_state_model.h
diff --git a/components/security_state/security_state_model.h b/components/security_state/security_state_model.h
index 235c6b5e224211fe15b3e8b59c893d6fda2f05e4..83749e5143e7934b71af884fe4732c13b324d787 100644
--- a/components/security_state/security_state_model.h
+++ b/components/security_state/security_state_model.h
@@ -94,14 +94,23 @@ class SecurityStateModel {
CONTENT_STATUS_DISPLAYED_AND_RAN,
};
+ // Describes whether the page contains malicious resources such as
+ // malware or phishing attacks.
+ enum MaliciousContentStatus {
+ MALICIOUS_CONTENT_STATUS_NONE,
+ MALICIOUS_CONTENT_STATUS_MALWARE,
estark 2016/11/09 16:07:44 These different statuses will be used to distingui
Nathan Parker 2016/11/10 00:13:03 Acknowledged.
+ MALICIOUS_CONTENT_STATUS_UNWANTED_SOFTWARE,
+ MALICIOUS_CONTENT_STATUS_SOCIAL_ENGINEERING,
+ };
+
// Describes the security status of a page or request. This is the
// main data structure provided by this class.
struct SecurityInfo {
SecurityInfo();
~SecurityInfo();
SecurityLevel security_level;
- // True if the page fails the browser's malware or phishing checks.
- bool fails_malware_check;
+ // Describes the nature of the page's malicious content, if any.
+ MaliciousContentStatus malicious_content_status;
SHA1DeprecationStatus sha1_deprecation_status;
// |mixed_content_status| describes the presence of content that was
// loaded over a nonsecure (HTTP) connection.
@@ -151,8 +160,7 @@ class SecurityStateModel {
bool operator==(const VisibleSecurityState& other) const;
GURL url;
- // True if the page fails the browser's malware or phishing checks.
- bool fails_malware_check;
+ MaliciousContentStatus malicious_content_status;
// CONNECTION SECURITY FIELDS
// Whether the connection security fields are initialized.

Powered by Google App Engine
This is Rietveld 408576698