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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_util.cc

Issue 11615011: Small modifications to safebrowsing code to make it simpler to add the extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 years 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: chrome/browser/safe_browsing/safe_browsing_util.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.cc b/chrome/browser/safe_browsing/safe_browsing_util.cc
index 28302e0acd81d684801e3b9df02129c9817feae1..c7ab0d6cd178fc0a8f9b6842bcc7c2aebdbdc433 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_util.cc
@@ -164,8 +164,8 @@ const char kBinHashList[] = "goog-badbin-digestvar-disabled";
const char kCsdWhiteList[] = "goog-csdwhite-sha256";
const char kDownloadWhiteList[] = "goog-downloadwhite-digest256";
-int GetListId(const std::string& name) {
- int id;
+ListType GetListId(const std::string& name) {
+ ListType id;
if (name == safe_browsing_util::kMalwareList) {
id = MALWARE;
} else if (name == safe_browsing_util::kPhishingList) {
@@ -184,7 +184,7 @@ int GetListId(const std::string& name) {
return id;
}
-bool GetListName(int list_id, std::string* list) {
+bool GetListName(ListType list_id, std::string* list) {
switch (list_id) {
case MALWARE:
*list = safe_browsing_util::kMalwareList;
@@ -499,4 +499,5 @@ std::string SBFullHashToString(const SBFullHash& hash) {
DCHECK_EQ(crypto::kSHA256Length, sizeof(hash.full_hash));
return std::string(hash.full_hash, sizeof(hash.full_hash));
}
+
} // namespace safe_browsing_util

Powered by Google App Engine
This is Rietveld 408576698