summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/safe_browsing_util.cc
diff options
context:
space:
mode:
authornoelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 19:04:51 +0000
committernoelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 19:04:51 +0000
commitd4b7a5d6b150a86813fde4013ae83ba77448621e (patch)
tree9c293f6170bbc6a12a4e93a4439131a4a3504df1 /chrome/browser/safe_browsing/safe_browsing_util.cc
parent023424e03760080f4ae54c3643e80dce51490ab2 (diff)
downloadchromium_src-d4b7a5d6b150a86813fde4013ae83ba77448621e.zip
chromium_src-d4b7a5d6b150a86813fde4013ae83ba77448621e.tar.gz
chromium_src-d4b7a5d6b150a86813fde4013ae83ba77448621e.tar.bz2
Add a new SafeBrowsing list which contains a whitelist for the client-side
phishing detection. This whitelist will only contain full-length hashes and should be small (fewer than 1K entries). The whitelist is loaded in memory and is looked up on every page load before we start the client-side phishing detection. If the loaded URL is on the csd whitelist we won't start client-side phishing detection for that URL. BUG= TEST= Review URL: http://codereview.chromium.org/6592056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77494 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_util.cc')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_util.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.cc b/chrome/browser/safe_browsing/safe_browsing_util.cc
index 06a18ca..4eb6083 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_util.cc
@@ -167,6 +167,7 @@ const char kMalwareList[] = "goog-malware-shavar";
const char kPhishingList[] = "goog-phish-shavar";
const char kBinUrlList[] = "goog-badbinurl-shavar";
const char kBinHashList[] = "goog-badbinhash-shavar";
+const char kCsdWhiteList[] = "goog-csdwhite-sha256";
// Keywords to identify a list type from listname.
// TODO(lzheng): check if this can be replaced by full listnames.
@@ -183,8 +184,10 @@ int GetListId(const std::string& name) {
id = PHISH;
} else if (name == safe_browsing_util::kBinUrlList) {
id = BINURL;
- } else if (name == safe_browsing_util::kBinHashList) {
+ } else if (name == safe_browsing_util::kBinHashList) {
id = BINHASH;
+ } else if (name == safe_browsing_util::kCsdWhiteList) {
+ id = CSDWHITELIST;
} else {
id = INVALID;
}
@@ -205,6 +208,9 @@ bool GetListName(int list_id, std::string* list) {
case BINHASH:
*list = safe_browsing_util::kBinHashList;
break;
+ case CSDWHITELIST:
+ *list = safe_browsing_util::kCsdWhiteList;
+ break;
default:
return false;
}