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

Unified Diff: chrome/browser/safe_browsing/environment_data_collection_win.cc

Issue 346763003: Adding blacklisted dlls to safe browsing incident reports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@updatedWard2
Patch Set: rebasing again... Created 6 years, 6 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/environment_data_collection_win.cc
diff --git a/chrome/browser/safe_browsing/environment_data_collection_win.cc b/chrome/browser/safe_browsing/environment_data_collection_win.cc
index a6498d36e5e453dbc21f00627a93ed08f8a4a9c1..4872b5411f153d9873916d733b972709f342fdc8 100644
--- a/chrome/browser/safe_browsing/environment_data_collection_win.cc
+++ b/chrome/browser/safe_browsing/environment_data_collection_win.cc
@@ -10,11 +10,13 @@
#include "base/i18n/case_conversion.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/win/registry.h"
#include "chrome/browser/install_verification/win/module_info.h"
#include "chrome/browser/install_verification/win/module_verification_common.h"
#include "chrome/browser/net/service_providers_win.h"
#include "chrome/browser/safe_browsing/path_sanitizer.h"
#include "chrome/common/safe_browsing/csd.pb.h"
+#include "chrome_elf/chrome_elf_constants.h"
namespace safe_browsing {
@@ -88,10 +90,23 @@ void RecordLspFeature(ClientIncidentReport_EnvironmentData_Process* process) {
}
}
+void CollectDllBlacklistData(
+ ClientIncidentReport_EnvironmentData_Process* process) {
+ PathSanitizer path_sanitizer;
+ base::win::RegistryValueIterator iter(HKEY_CURRENT_USER,
+ blacklist::kRegistryFinchListPath);
+ for (; iter.Valid(); ++iter) {
+ base::FilePath dll_name(iter.Value());
+ path_sanitizer.StripHomeDirectory(&dll_name);
+ process->add_blacklisted_dll(dll_name.AsUTF8Unsafe());
+ }
+}
+
void CollectPlatformProcessData(
ClientIncidentReport_EnvironmentData_Process* process) {
CollectDlls(process);
RecordLspFeature(process);
+ CollectDllBlacklistData(process);
}
} // namespace safe_browsing

Powered by Google App Engine
This is Rietveld 408576698