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

Unified Diff: components/subresource_filter/content/browser/fake_safe_browsing_database_manager.h

Issue 2814733002: Add the SocEng as a type for checking in CheckUrlForSubresourceFilter. (Closed)
Patch Set: . Created 3 years, 7 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/subresource_filter/content/browser/fake_safe_browsing_database_manager.h
diff --git a/components/subresource_filter/content/browser/fake_safe_browsing_database_manager.h b/components/subresource_filter/content/browser/fake_safe_browsing_database_manager.h
index d216217982ea2022be169d9cd229cbc85373cc23..82d30e2e46934eaeb35b1a89f44b8c12ded33195 100644
--- a/components/subresource_filter/content/browser/fake_safe_browsing_database_manager.h
+++ b/components/subresource_filter/content/browser/fake_safe_browsing_database_manager.h
@@ -22,7 +22,9 @@ class FakeSafeBrowsingDatabaseManager
FakeSafeBrowsingDatabaseManager();
void AddBlacklistedUrl(const GURL& url,
- safe_browsing::SBThreatType threat_type);
+ safe_browsing::SBThreatType threat_type,
+ safe_browsing::ThreatPatternType pattern_type =
+ safe_browsing::ThreatPatternType::NONE);
void RemoveBlacklistedUrl(const GURL& url);
void SimulateTimeout();
@@ -45,8 +47,11 @@ class FakeSafeBrowsingDatabaseManager
private:
void OnCheckUrlForSubresourceFilterComplete(Client* client, const GURL& url);
- std::map<GURL, safe_browsing::SBThreatType> url_to_threat_type_;
std::set<Client*> checks_;
+ std::map<
+ GURL,
+ std::pair<safe_browsing::SBThreatType, safe_browsing::ThreatPatternType>>
+ url_to_threat_type_;
bool simulate_timeout_;
DISALLOW_COPY_AND_ASSIGN(FakeSafeBrowsingDatabaseManager);

Powered by Google App Engine
This is Rietveld 408576698