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

Unified Diff: chrome/browser/safe_browsing/ui_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
« no previous file with comments | « chrome/browser/safe_browsing/ui_manager.h ('k') | components/components_tests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/ui_manager.cc
diff --git a/chrome/browser/safe_browsing/ui_manager.cc b/chrome/browser/safe_browsing/ui_manager.cc
index a48422827f8967b830ae01f3d1afef19bfd81b7f..500b49c80901d701364041d3f7329b361d25981f 100644
--- a/chrome/browser/safe_browsing/ui_manager.cc
+++ b/chrome/browser/safe_browsing/ui_manager.cc
@@ -152,11 +152,13 @@ void SafeBrowsingUIManager::DisplayBlockingPage(
// applied to malware sites tagged as "landing sites" (see "Types of
// Malware sites" under
// https://developers.google.com/safe-browsing/developers_guide_v3#UserWarnings).
+ // TODO(nparker): Replace the use of raw_metadata when other fields are
+ // populated. crbug/589610
MalwarePatternType proto;
if (resource.threat_type == SB_THREAT_TYPE_URL_UNWANTED ||
(resource.threat_type == SB_THREAT_TYPE_URL_MALWARE &&
- !resource.threat_metadata.empty() &&
- proto.ParseFromString(resource.threat_metadata) &&
+ !resource.threat_metadata.raw_metadata.empty() &&
+ proto.ParseFromString(resource.threat_metadata.raw_metadata) &&
proto.pattern_type() == MalwarePatternType::LANDING)) {
if (!resource.callback.is_null()) {
DCHECK(resource.callback_thread);
« no previous file with comments | « chrome/browser/safe_browsing/ui_manager.h ('k') | components/components_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698