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

Unified Diff: components/safe_browsing_db/util.cc

Issue 1673733002: Support new Safe Browsing list "goog-badresource-shavar" in SafeBrowsingDatabase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Post-merge test fix Created 4 years, 10 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_db/util.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/util.cc
diff --git a/components/safe_browsing_db/util.cc b/components/safe_browsing_db/util.cc
index 7289a0f74da1dbb1f8afe196c84185cfa488075a..2eaf6307d8f8757358da3eb871e9ccad5019a58a 100644
--- a/components/safe_browsing_db/util.cc
+++ b/components/safe_browsing_db/util.cc
@@ -53,11 +53,12 @@ const char kIPBlacklist[] = "goog-badip-digest256";
const char kUnwantedUrlList[] = "goog-unwanted-shavar";
const char kInclusionWhitelist[] = "goog-csdinclusionwhite-sha256";
const char kModuleWhitelist[] = "goog-whitemodule-digest256";
+const char kResourceBlacklist[] = "goog-badresource-shavar";
-const char* kAllLists[10] = {
+const char* kAllLists[11] = {
kMalwareList, kPhishingList, kBinUrlList, kCsdWhiteList,
kDownloadWhiteList, kExtensionBlacklist, kIPBlacklist, kUnwantedUrlList,
- kInclusionWhitelist, kModuleWhitelist,
+ kInclusionWhitelist, kModuleWhitelist, kResourceBlacklist,
};
ListType GetListId(const base::StringPiece& name) {
@@ -82,6 +83,8 @@ ListType GetListId(const base::StringPiece& name) {
id = INCLUSIONWHITELIST;
} else if (name == kModuleWhitelist) {
id = MODULEWHITELIST;
+ } else if (name == kResourceBlacklist) {
+ id = RESOURCEBLACKLIST;
} else {
id = INVALID;
}
@@ -119,6 +122,8 @@ bool GetListName(ListType list_id, std::string* list) {
break;
case MODULEWHITELIST:
*list = kModuleWhitelist;
+ case RESOURCEBLACKLIST:
+ *list = kResourceBlacklist;
igorcov 2016/10/26 11:37:34 The break statement was stolen from above and now
grt (UTC plus 2) 2016/10/26 11:44:49 fix out for review in https://codereview.chromium.
break;
default:
return false;
« no previous file with comments | « components/safe_browsing_db/util.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698