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

Unified Diff: components/security_state/security_state_model.h

Issue 2481743009: Expose malware/phishing/etc. distinction from SafeBrowsingUIManager (Closed)
Patch Set: rebase 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 b740bb1058c8ab3e098080fd754920f136f510b7..741c1d4bfdf243b751fcac3b2a6608d506ceb998 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,
+ 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.
@@ -153,8 +162,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.
« no previous file with comments | « chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc ('k') | components/security_state/security_state_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698