OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/win/enumerate_modules_model.h" | 5 #include "chrome/browser/win/enumerate_modules_model.h" |
6 | 6 |
7 #include <softpub.h> | 7 #include <softpub.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <tlhelp32.h> | 10 #include <tlhelp32.h> |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 // enumeration in this already started task. | 262 // enumeration in this already started task. |
263 ++index; | 263 ++index; |
264 } | 264 } |
265 | 265 |
266 // Getting here means that all of the modules have been inspected. | 266 // Getting here means that all of the modules have been inspected. |
267 return ScanImplFinish(); | 267 return ScanImplFinish(); |
268 } | 268 } |
269 | 269 |
270 void ModuleEnumerator::ScanImplFinish() { | 270 void ModuleEnumerator::ScanImplFinish() { |
271 // TODO(chrisha): Annotate any modules that are suspicious/bad. | 271 // TODO(chrisha): Annotate any modules that are suspicious/bad. |
272 for (auto& module : *enumerated_modules_) { | |
273 if (module.name == L"chrome.dll") { | |
274 module.status = ModuleStatus::CONFIRMED_BAD; | |
275 module.recommended_action = RecommendedAction::UNINSTALL; | |
chrisha
2017/05/02 21:28:25
This is debugging code?
Patrick Monette
2017/05/29 22:04:56
Yes. Removed.
| |
276 } | |
277 } | |
272 | 278 |
273 ReportThirdPartyMetrics(); | 279 ReportThirdPartyMetrics(); |
274 | 280 |
275 std::sort(enumerated_modules_->begin(), | 281 std::sort(enumerated_modules_->begin(), |
276 enumerated_modules_->end(), ModuleSort); | 282 enumerated_modules_->end(), ModuleSort); |
277 | 283 |
278 UMA_HISTOGRAM_TIMES("Conflicts.EnumerationInspectionTime", | 284 UMA_HISTOGRAM_TIMES("Conflicts.EnumerationInspectionTime", |
279 enumeration_inspection_time_); | 285 enumeration_inspection_time_); |
280 UMA_HISTOGRAM_TIMES("Conflicts.EnumerationTotalTime", | 286 UMA_HISTOGRAM_TIMES("Conflicts.EnumerationTotalTime", |
281 enumeration_total_time_); | 287 enumeration_total_time_); |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
721 | 727 |
722 UMA_HISTOGRAM_COUNTS_100("Conflicts.SuspectedBadModules", | 728 UMA_HISTOGRAM_COUNTS_100("Conflicts.SuspectedBadModules", |
723 suspected_bad_modules_detected_); | 729 suspected_bad_modules_detected_); |
724 UMA_HISTOGRAM_COUNTS_100("Conflicts.ConfirmedBadModules", | 730 UMA_HISTOGRAM_COUNTS_100("Conflicts.ConfirmedBadModules", |
725 confirmed_bad_modules_detected_); | 731 confirmed_bad_modules_detected_); |
726 | 732 |
727 // Forward the callback to any registered observers. | 733 // Forward the callback to any registered observers. |
728 for (Observer& observer : observers_) | 734 for (Observer& observer : observers_) |
729 observer.OnScanCompleted(); | 735 observer.OnScanCompleted(); |
730 } | 736 } |
OLD | NEW |