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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service_browsertest.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: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 8807d14920f9bb253726f0d8bc8fcfa7c4d9bf92..3d56a3528fd2d7d4c4be6a976c3c0ba3fe0ac3a8 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -705,15 +705,15 @@ class SafeBrowsingServiceMetadataTest
MalwarePatternType proto;
switch (GetParam()) {
case METADATA_NONE:
- full_hash->metadata = std::string();
+ full_hash->metadata.raw_metadata = std::string();
break;
case METADATA_LANDING:
proto.set_pattern_type(MalwarePatternType::LANDING);
- full_hash->metadata = proto.SerializeAsString();
+ full_hash->metadata.raw_metadata = proto.SerializeAsString();
break;
case METADATA_DISTRIBUTION:
proto.set_pattern_type(MalwarePatternType::DISTRIBUTION);
- full_hash->metadata = proto.SerializeAsString();
+ full_hash->metadata.raw_metadata = proto.SerializeAsString();
break;
}
}
@@ -1219,7 +1219,7 @@ class TestSBClient : public base::RefCountedThreadSafe<TestSBClient>,
// Called when the result of checking a browse URL is known.
void OnCheckBrowseUrlResult(const GURL& /* url */,
SBThreatType threat_type,
- const std::string& /* metadata */) override {
+ const ThreatMetadata& /* metadata */) override {
threat_type_ = threat_type;
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&TestSBClient::CheckDone, this));
« no previous file with comments | « chrome/browser/safe_browsing/protocol_parser_unittest.cc ('k') | chrome/browser/safe_browsing/safe_browsing_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698