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

Unified Diff: components/safe_browsing/browser/threat_details.cc

Issue 2925693003: Making CSD ReportType enum consistent. (Closed)
Patch Set: Handling SBThreatType enums as well Created 3 years, 6 months 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
« no previous file with comments | « components/safe_browsing/base_ping_manager_unittest.cc ('k') | components/safe_browsing/csd.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing/browser/threat_details.cc
diff --git a/components/safe_browsing/browser/threat_details.cc b/components/safe_browsing/browser/threat_details.cc
index 4a75c4ca9f5d7ac6d4316503937313de78206037..39b787677e8dc13a657ae7a9b90abedff7e79900 100644
--- a/components/safe_browsing/browser/threat_details.cc
+++ b/components/safe_browsing/browser/threat_details.cc
@@ -72,12 +72,12 @@ ClientSafeBrowsingReportRequest::ReportType GetReportTypeFromSBThreatType(
return ClientSafeBrowsingReportRequest::URL_MALWARE;
case SB_THREAT_TYPE_URL_UNWANTED:
return ClientSafeBrowsingReportRequest::URL_UNWANTED;
- case SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL:
- return ClientSafeBrowsingReportRequest::CLIENT_SIDE_PHISHING_URL;
- case SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL:
- return ClientSafeBrowsingReportRequest::CLIENT_SIDE_MALWARE_URL;
- case SB_THREAT_TYPE_PASSWORD_PROTECTION_PHISHING_URL:
- return ClientSafeBrowsingReportRequest::PASSWORD_PROTECTION_PHISHING_URL;
+ case SB_THREAT_TYPE_URL_CLIENT_SIDE_PHISHING:
+ return ClientSafeBrowsingReportRequest::URL_CLIENT_SIDE_PHISHING;
+ case SB_THREAT_TYPE_URL_CLIENT_SIDE_MALWARE:
+ return ClientSafeBrowsingReportRequest::URL_CLIENT_SIDE_MALWARE;
+ case SB_THREAT_TYPE_URL_PASSWORD_PROTECTION_PHISHING:
+ return ClientSafeBrowsingReportRequest::URL_PASSWORD_PROTECTION_PHISHING;
default: // Gated by SafeBrowsingBlockingPage::ShouldReportThreatDetails.
NOTREACHED() << "We should not send report for threat type "
<< threat_type;
@@ -361,7 +361,7 @@ void ThreatDetails::StartCollection() {
report_->set_type(GetReportTypeFromSBThreatType(resource_.threat_type));
}
- if (resource_.threat_type == SB_THREAT_TYPE_PASSWORD_PROTECTION_PHISHING_URL)
+ if (resource_.threat_type == SB_THREAT_TYPE_URL_PASSWORD_PROTECTION_PHISHING)
report_->set_token(resource_.token);
GURL referrer_url;
« no previous file with comments | « components/safe_browsing/base_ping_manager_unittest.cc ('k') | components/safe_browsing/csd.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698