| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/safe_browsing/incident_reporting/environment_data_colle
ction_win.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/environment_data_colle
ction_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/i18n/case_conversion.h" | 10 #include "base/i18n/case_conversion.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 process->mutable_dll(i) | 95 process->mutable_dll(i) |
| 96 ->add_feature(ClientIncidentReport_EnvironmentData_Process_Dll::LSP); | 96 ->add_feature(ClientIncidentReport_EnvironmentData_Process_Dll::LSP); |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 void CollectDllBlacklistData( | 101 void CollectDllBlacklistData( |
| 102 ClientIncidentReport_EnvironmentData_Process* process) { | 102 ClientIncidentReport_EnvironmentData_Process* process) { |
| 103 PathSanitizer path_sanitizer; | 103 PathSanitizer path_sanitizer; |
| 104 base::win::RegistryValueIterator iter(HKEY_CURRENT_USER, | 104 base::win::RegistryValueIterator iter(HKEY_CURRENT_USER, |
| 105 blacklist::kRegistryFinchListPath); | 105 blacklist::kRegistryFinchListPath, |
| 106 0); // wow64_access |
| 106 for (; iter.Valid(); ++iter) { | 107 for (; iter.Valid(); ++iter) { |
| 107 base::FilePath dll_name(iter.Value()); | 108 base::FilePath dll_name(iter.Value()); |
| 108 path_sanitizer.StripHomeDirectory(&dll_name); | 109 path_sanitizer.StripHomeDirectory(&dll_name); |
| 109 process->add_blacklisted_dll(dll_name.AsUTF8Unsafe()); | 110 process->add_blacklisted_dll(dll_name.AsUTF8Unsafe()); |
| 110 } | 111 } |
| 111 } | 112 } |
| 112 | 113 |
| 113 void CollectModuleVerificationData( | 114 void CollectModuleVerificationData( |
| 114 const wchar_t* const modules_to_verify[], | 115 const wchar_t* const modules_to_verify[], |
| 115 size_t num_modules_to_verify, | 116 size_t num_modules_to_verify, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 142 void CollectPlatformProcessData( | 143 void CollectPlatformProcessData( |
| 143 ClientIncidentReport_EnvironmentData_Process* process) { | 144 ClientIncidentReport_EnvironmentData_Process* process) { |
| 144 CollectDlls(process); | 145 CollectDlls(process); |
| 145 RecordLspFeature(process); | 146 RecordLspFeature(process); |
| 146 CollectDllBlacklistData(process); | 147 CollectDllBlacklistData(process); |
| 147 CollectModuleVerificationData( | 148 CollectModuleVerificationData( |
| 148 kModulesToVerify, arraysize(kModulesToVerify), process); | 149 kModulesToVerify, arraysize(kModulesToVerify), process); |
| 149 } | 150 } |
| 150 | 151 |
| 151 } // namespace safe_browsing | 152 } // namespace safe_browsing |
| OLD | NEW |