diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 08:57:45 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 08:57:45 +0000 |
commit | d80268a511216fb8b0f815e50f415046a7320b7f (patch) | |
tree | c73482c104ec4605d47c7e9e0b20639fc4c6946c /chrome/browser/enumerate_modules_model_unittest_win.cc | |
parent | f2b94f97aded3c9e93116bcac143bf2ccb653d46 (diff) | |
download | chromium_src-d80268a511216fb8b0f815e50f415046a7320b7f.zip chromium_src-d80268a511216fb8b0f815e50f415046a7320b7f.tar.gz chromium_src-d80268a511216fb8b0f815e50f415046a7320b7f.tar.bz2 |
Integrate about:conflicts with --diagnostics
This should enable the user to find conflicting dlls that are crashing Chrome on startup.
This changelist introduces a limited_mode for scanning, since the diagnostics tests run without the help of many Chrome services, so we can't use the File thread for asynchronous scanning or the notification system.
Also changed the scanning so that if no signature/description is given in the blacklist, then we mark the DLL as a confirmed match if the name and the location match (before we used to match it as a 'suspected' match). A very sizable chunk of the blacklist is malware, which has no signature, so this gives us the ability to trigger the wrench badge on finding malware (that part remains opt-in through about:flags).
Also added failure count to diagnostics output (sometimes the error scrolls off screen, so having a note at the bottom helps).
BUG=51105
TEST=All diagnostics tests run as part of the unit tests.
Review URL: http://codereview.chromium.org/6098004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70600 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/enumerate_modules_model_unittest_win.cc')
-rw-r--r-- | chrome/browser/enumerate_modules_model_unittest_win.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/chrome/browser/enumerate_modules_model_unittest_win.cc b/chrome/browser/enumerate_modules_model_unittest_win.cc index 7aa6b63..1992e7a 100644 --- a/chrome/browser/enumerate_modules_model_unittest_win.cc +++ b/chrome/browser/enumerate_modules_model_unittest_win.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -78,6 +78,12 @@ TEST_F(EnumerateModulesTest, NormalizeEntry) { const ModuleEnumerator::Module kStandardModule = { kType, kStatus, L"c:\\foo\\bar.dll", L"", L"Prod", L"Desc", L"1.0", L"Sig", ModuleEnumerator::NONE }; +const ModuleEnumerator::Module kStandardModuleNoDescription = + { kType, kStatus, L"c:\\foo\\bar.dll", L"", L"Prod", L"", L"1.0", L"Sig", + ModuleEnumerator::NONE }; +const ModuleEnumerator::Module kStandardModuleNoSignature = + { kType, kStatus, L"c:\\foo\\bar.dll", L"", L"Prod", L"Desc", L"1.0", L"", + ModuleEnumerator::NONE }; // Name, location, description and signature are compared by hashing. static const char kMatchName[] = "88e8c9e0"; // "bar.dll". @@ -120,6 +126,16 @@ const struct MatchingEntryList { kStandardModule, { kMatchName, kMatchLocation, kEmpty, kEmpty, kEmpty, ModuleEnumerator::SEE_LINK } + }, { // Matches: Name, location, (description not given) => Confirmed match. + ModuleEnumerator::CONFIRMED_BAD, + kStandardModuleNoDescription, // Note: No description. + { kMatchName, kMatchLocation, kEmpty, kEmpty, kEmpty, + ModuleEnumerator::SEE_LINK } + }, { // Matches: Name, location, (signature not given) => Confirmed match. + ModuleEnumerator::CONFIRMED_BAD, + kStandardModuleNoSignature, // Note: No signature. + { kMatchName, kMatchLocation, kEmpty, kEmpty, kEmpty, + ModuleEnumerator::SEE_LINK } }, { // Matches: Name, location (not version) => Not a match. ModuleEnumerator::NOT_MATCHED, kStandardModule, |