| Index: components/safe_browsing_db/v4_local_database_manager.cc
|
| diff --git a/components/safe_browsing_db/v4_local_database_manager.cc b/components/safe_browsing_db/v4_local_database_manager.cc
|
| index 45748e4601eec7353fc74d4d88140c1aaccc994e..5bc0b30a92bf4c782d3d563c54def1daed23ee53 100644
|
| --- a/components/safe_browsing_db/v4_local_database_manager.cc
|
| +++ b/components/safe_browsing_db/v4_local_database_manager.cc
|
| @@ -17,6 +17,7 @@
|
| #include "components/safe_browsing_db/v4_feature_list.h"
|
| #include "components/safe_browsing_db/v4_protocol_manager_util.h"
|
| #include "content/public/browser/browser_thread.h"
|
| +#include "crypto/sha2.h"
|
|
|
| using content::BrowserThread;
|
| using base::TimeTicks;
|
| @@ -304,16 +305,16 @@ bool V4LocalDatabaseManager::MatchMalwareIP(const std::string& ip_address) {
|
| }
|
|
|
| bool V4LocalDatabaseManager::MatchModuleWhitelistString(
|
| - const std::string& str) {
|
| + const std::string& module_filename) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| -
|
| if (!enabled_ || !v4_database_) {
|
| - // To make sure we are conservative we return true.
|
| + // Fail open: Whitelist everything
|
| return true;
|
| }
|
|
|
| + FullHash hash = crypto::SHA256HashString(module_filename);
|
| return HandleHashSynchronously(
|
| - str, StoresToCheck({GetChromeFilenameClientIncidentId()}));
|
| + hash, StoresToCheck({GetChromeFilenameClientIncidentId()}));
|
| }
|
|
|
| ThreatSource V4LocalDatabaseManager::GetThreatSource() const {
|
|
|