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

Unified Diff: components/safe_browsing_db/v4_get_hash_protocol_manager.cc

Issue 1726403006: Switch Safe Browsing's metadata from string to struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ParseJson in test 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
Index: components/safe_browsing_db/v4_get_hash_protocol_manager.cc
diff --git a/components/safe_browsing_db/v4_get_hash_protocol_manager.cc b/components/safe_browsing_db/v4_get_hash_protocol_manager.cc
index b78a4b5fb0b94e5b4c628848db656fb446714a6e..55196baea890c2f6cc5c612af7c3f441f4968b05 100644
--- a/components/safe_browsing_db/v4_get_hash_protocol_manager.cc
+++ b/components/safe_browsing_db/v4_get_hash_protocol_manager.cc
@@ -211,11 +211,11 @@ bool V4GetHashProtocolManager::ParseHashResponse(
if (match.has_platform_type() &&
match.platform_type() == CHROME_PLATFORM) {
if (match.has_threat_entry_metadata()) {
- // For API Abuse, store a csv of the returned permissions.
+ // For API Abuse, store a list of the returned permissions.
for (const ThreatEntryMetadata::MetadataEntry& m :
match.threat_entry_metadata().entries()) {
if (m.key() == "permission") {
- result.metadata += m.value() + ",";
+ result.metadata.api_permissions.push_back(m.value());
}
}
} else {
« no previous file with comments | « components/safe_browsing_db/util.cc ('k') | components/safe_browsing_db/v4_get_hash_protocol_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698