diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-08 12:03:50 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-08 12:03:50 +0000 |
commit | cfc23434779a43f4d67c560487cd2d8915e95d8e (patch) | |
tree | 401bc0184aac15e06b4449fe866b1ae578189b16 | |
parent | c3a536ce2527b3d0616e0440704aa2dc5c73f43e (diff) | |
download | chromium_src-cfc23434779a43f4d67c560487cd2d8915e95d8e.zip chromium_src-cfc23434779a43f4d67c560487cd2d8915e95d8e.tar.gz chromium_src-cfc23434779a43f4d67c560487cd2d8915e95d8e.tar.bz2 |
After reviewing the frequency list for 3rd party crashers there are a few
new items to add to the about:conflicts list.
Also changed it so that the conflicts badge gets removed once you open the
wrench menu.
BUG=67897
TEST=Please contact me for details, it is a bit involved.
Review URL: http://codereview.chromium.org/6804011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80923 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/enumerate_modules_model_win.cc | 79 | ||||
-rw-r--r-- | chrome/browser/enumerate_modules_model_win.h | 22 | ||||
-rw-r--r-- | chrome/browser/ui/toolbar/wrench_menu_model.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/views/toolbar_view.cc | 11 | ||||
-rw-r--r-- | content/common/notification_type.h | 7 |
5 files changed, 95 insertions, 29 deletions
diff --git a/chrome/browser/enumerate_modules_model_win.cc b/chrome/browser/enumerate_modules_model_win.cc index f1ac462..7119494 100644 --- a/chrome/browser/enumerate_modules_model_win.cc +++ b/chrome/browser/enumerate_modules_model_win.cc @@ -41,6 +41,11 @@ static const ModuleEnumerator::RecommendedAction kUninstallLink = static_cast<ModuleEnumerator::RecommendedAction>( ModuleEnumerator::UNINSTALL | ModuleEnumerator::SEE_LINK); +// Short-hand for things on the blacklist we are investigating and have info. +static const ModuleEnumerator::RecommendedAction kInvestigatingLink = + static_cast<ModuleEnumerator::RecommendedAction>( + ModuleEnumerator::INVESTIGATING | ModuleEnumerator::SEE_LINK); + // A sort method that sorts by bad modules first, then by full name (including // path). static bool ModuleSort(const ModuleEnumerator::Module& a, @@ -104,6 +109,11 @@ bool ConvertToLongPath(const string16& short_path, string16* long_path) { const ModuleEnumerator::BlacklistEntry ModuleEnumerator::kModuleBlacklist[] = { // NOTE: Please keep this list sorted by dll name, then location. + // Version 3.2.1.6 seems to be implicated in most cases (and 3.2.2.2 in some). + // There is a more recent version available for download. + // accelerator.dll, "%programfiles%\\speedbit video accelerator\\". + { "7ba9402f", "c9132d48", "", "", "", INVESTIGATING }, + // apiqq0.dll, "%temp%\\". { "26134911", "59145acf", "", "", "", kUninstallLink }, @@ -113,6 +123,11 @@ const ModuleEnumerator::BlacklistEntry ModuleEnumerator::kModuleBlacklist[] = { // arking1.dll, "%systemroot%\\system32\\". { "c60ca062", "23d01d5b", "", "", "", kUninstallLink }, + // Said to belong to Killer NIC from BigFoot Networks (not verified). Versions + // 6.0.0.7 and 6.0.0.10 implicated. + // bfllr.dll, "%systemroot%\\system32\\". + { "6bb57633", "23d01d5b", "", "", "", INVESTIGATING }, + // clickpotatolitesahook.dll, "". Different version each report. { "0396e037.dll", "", "", "", "", kUninstallLink }, @@ -125,6 +140,11 @@ const ModuleEnumerator::BlacklistEntry ModuleEnumerator::kModuleBlacklist[] = { // dsoqq0.dll, "%temp%\\". { "1c4df325", "59145acf", "", "", "", kUninstallLink }, + // This looks like a malware edition of a Brazilian Bank plugin, sometimes + // referred to as Malware.Banc.A. + // gbieh.dll, "%programfiles%\\gbplugin\\". + { "4cb4f2e3", "88e4a3b1", "", "", "", kUninstallLink }, + // hblitesahook.dll. Each report has different version number in location. { "5d10b363", "", "", "", "", kUninstallLink }, @@ -170,10 +190,19 @@ const ModuleEnumerator::BlacklistEntry ModuleEnumerator::kModuleBlacklist[] = { // nodqq0.dll, "%temp%\\". { "b86ce04d", "59145acf", "", "", "", kUninstallLink }, + // nProtect GameGuard Anti-cheat system. Every report has a different + // location, since it is installed into and run from a game folder. Various + // versions implicated. + // npggnt.des, no fixed location. + { "f2c8790d", "", "", "", "", INVESTIGATING }, + // nvlsp.dll, // "%programfiles%\\nvidia corporation\\networkaccessmanager\\bin32\\". { "37f907e2", "3ad0ff23", "", "", "", INVESTIGATING }, + // post0.dll, "%systemroot%\\system32\\". + { "7405c0c8", "23d01d5b", "", "", "", kUninstallLink }, + // radhslib.dll (Naomi web filter), "%programfiles%\\rnamfler\\". // See http://crbug.com/12517. { "7edcd250", "0733dc3e", "", "", "", INVESTIGATING }, @@ -184,6 +213,9 @@ const ModuleEnumerator::BlacklistEntry ModuleEnumerator::kModuleBlacklist[] = { // rooksdol.dll, "%programfiles%\\trusteer\\rapport\\bin\\". { "802aefef", "06120e13", "", "", "", INVESTIGATING }, + // sdata.dll, "%programdata%\\srtserv\\". + { "1936d5cc", "223c44be", "", "", "", kUninstallLink }, + // searchtree.dll, // "%programfiles%\\contentwatch\\internet protection\\modules\\". { "f6915a31", "4e61ce60", "", "", "", INVESTIGATING }, @@ -191,6 +223,11 @@ const ModuleEnumerator::BlacklistEntry ModuleEnumerator::kModuleBlacklist[] = { // sgprxy.dll, "%commonprogramfiles%\\is3\\anti-spyware\\". { "005965ea", "bc5673f2", "", "", "", INVESTIGATING }, + // swi_filter_0001.dll (Sophos Web Intelligence), + // "%programfiles%\\sophos\\sophos anti-virus\\web intelligence\\". + // A small random sample all showed version 1.0.5.0. + { "61112d7b", "25fb120f", "", "", "", INVESTIGATING }, + // twking0.dll, "%systemroot%\\system32\\". { "0355549b", "23d01d5b", "", "", "", kUninstallLink }, @@ -538,6 +575,7 @@ void ModuleEnumerator::PreparePathMappings() { std::vector<string16> env_vars; env_vars.push_back(L"LOCALAPPDATA"); env_vars.push_back(L"ProgramFiles"); + env_vars.push_back(L"ProgramData"); env_vars.push_back(L"USERPROFILE"); env_vars.push_back(L"SystemRoot"); env_vars.push_back(L"TEMP"); @@ -716,6 +754,27 @@ EnumerateModulesModel* EnumerateModulesModel::GetInstance() { return Singleton<EnumerateModulesModel>::get(); } +bool EnumerateModulesModel::ShouldShowConflictWarning() const { + // If the user has acknowledged the conflict notification, then we don't need + // to show it again (because the scanning only happens once per the lifetime + // of the process). If we were to run the scanning more than once, then we'd + // need to clear the flag somewhere when we are ready to show it again. + if (conflict_notification_acknowledged_) + return false; + + return confirmed_bad_modules_detected_ > 0; +} + +void EnumerateModulesModel::AcknowledgeConflictNotification() { + if (!conflict_notification_acknowledged_) { + conflict_notification_acknowledged_ = true; + NotificationService::current()->Notify( + NotificationType::MODULE_INCOMPATIBILITY_BADGE_CHANGE, + Source<EnumerateModulesModel>(this), + NotificationService::NoDetails()); + } +} + void EnumerateModulesModel::ScanNow() { if (scanning_) return; // A scan is already in progress. @@ -731,7 +790,7 @@ void EnumerateModulesModel::ScanNow() { module_enumerator_->ScanNow(&enumerated_modules_, limited_mode_); } -ListValue* EnumerateModulesModel::GetModuleList() { +ListValue* EnumerateModulesModel::GetModuleList() const { if (scanning_) return NULL; @@ -821,8 +880,9 @@ ListValue* EnumerateModulesModel::GetModuleList() { } EnumerateModulesModel::EnumerateModulesModel() - : scanning_(false), - limited_mode_(false), + : limited_mode_(false), + scanning_(false), + conflict_notification_acknowledged_(false), confirmed_bad_modules_detected_(0), suspected_bad_modules_detected_(0) { const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); @@ -875,17 +935,14 @@ void EnumerateModulesModel::DoneScanning() { if (!cmd_line.HasSwitch(switches::kConflictingModulesCheck)) return; - if (suspected_bad_modules_detected_ || confirmed_bad_modules_detected_) { - bool found_confirmed_bad_modules = confirmed_bad_modules_detected_ > 0; - NotificationService::current()->Notify( - NotificationType::MODULE_INCOMPATIBILITY_DETECTED, - Source<EnumerateModulesModel>(this), - Details<bool>(&found_confirmed_bad_modules)); - } + NotificationService::current()->Notify( + NotificationType::MODULE_INCOMPATIBILITY_BADGE_CHANGE, + Source<EnumerateModulesModel>(this), + NotificationService::NoDetails()); } GURL EnumerateModulesModel::ConstructHelpCenterUrl( - const ModuleEnumerator::Module& module) { + const ModuleEnumerator::Module& module) const { if (!(module.recommended_action & ModuleEnumerator::SEE_LINK)) return GURL(); diff --git a/chrome/browser/enumerate_modules_model_win.h b/chrome/browser/enumerate_modules_model_win.h index 20a2ae2..f0cdd6d 100644 --- a/chrome/browser/enumerate_modules_model_win.h +++ b/chrome/browser/enumerate_modules_model_win.h @@ -122,8 +122,8 @@ class ModuleEnumerator : public base::RefCountedThreadSafe<ModuleEnumerator> { // progress). This function does not block while reading the module list // (unless we are in limited_mode, see below), and will notify when done // through the MODULE_LIST_ENUMERATED notification. - // The process will also send MODULE_INCOMPATIBILITY_DETECTED if an - // incompatible module was detected. + // The process will also send MODULE_INCOMPATIBILITY_BADGE_CHANGE to let + // observers know when it is time to update the wrench menu badge. // When in |limited_mode|, this function will not leverage the File thread // to run asynchronously and will therefore block until scanning is done // (and will also not send out any notifications). @@ -231,15 +231,22 @@ class EnumerateModulesModel { public: static EnumerateModulesModel* GetInstance(); + // Returns true if we should show the conflict notification. The conflict + // notification is only shown once during the lifetime of the process. + bool ShouldShowConflictWarning() const; + + // Called when the user has acknowledged the conflict notification. + void AcknowledgeConflictNotification(); + // Returns the number of suspected bad modules found in the last scan. // Returns 0 if no scan has taken place yet. - int suspected_bad_modules_detected() { + int suspected_bad_modules_detected() const { return suspected_bad_modules_detected_; } // Returns the number of confirmed bad modules found in the last scan. // Returns 0 if no scan has taken place yet. - int confirmed_bad_modules_detected() { + int confirmed_bad_modules_detected() const { return confirmed_bad_modules_detected_; } @@ -254,7 +261,7 @@ class EnumerateModulesModel { void ScanNow(); // Gets the whole module list as a ListValue. - ListValue* GetModuleList(); + ListValue* GetModuleList() const; private: friend struct DefaultSingletonTraits<EnumerateModulesModel>; @@ -269,7 +276,7 @@ class EnumerateModulesModel { // Constructs a Help Center article URL for help with a particular module. // The module must have the SEE_LINK attribute for |recommended_action| set, // otherwise this returns a blank string. - GURL ConstructHelpCenterUrl(const ModuleEnumerator::Module& module); + GURL ConstructHelpCenterUrl(const ModuleEnumerator::Module& module) const; // The vector containing all the modules enumerated. Will be normalized and // any bad modules will be marked. @@ -292,6 +299,9 @@ class EnumerateModulesModel { // True if we are currently scanning for modules. bool scanning_; + // Whether the conflict notification has been acknowledged by the user. + bool conflict_notification_acknowledged_; + // The number of confirmed bad modules (not including suspected bad ones) // found during last scan. int confirmed_bad_modules_detected_; diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc index 6c6f747..177f93e 100644 --- a/chrome/browser/ui/toolbar/wrench_menu_model.cc +++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc @@ -285,7 +285,10 @@ bool WrenchMenuModel::IsCommandIdVisible(int command_id) const { #if defined(OS_WIN) EnumerateModulesModel* loaded_modules = EnumerateModulesModel::GetInstance(); - return loaded_modules->confirmed_bad_modules_detected() > 0; + if (loaded_modules->confirmed_bad_modules_detected() <= 0) + return false; + loaded_modules->AcknowledgeConflictNotification(); + return true; #else return false; #endif diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc index a9a02bc..2f80927 100644 --- a/chrome/browser/ui/views/toolbar_view.cc +++ b/chrome/browser/ui/views/toolbar_view.cc @@ -115,7 +115,7 @@ ToolbarView::ToolbarView(Browser* browser) registrar_.Add(this, NotificationType::UPGRADE_RECOMMENDED, NotificationService::AllSources()); } - registrar_.Add(this, NotificationType::MODULE_INCOMPATIBILITY_DETECTED, + registrar_.Add(this, NotificationType::MODULE_INCOMPATIBILITY_BADGE_CHANGE, NotificationService::AllSources()); } @@ -387,12 +387,9 @@ void ToolbarView::Observe(NotificationType type, Layout(); SchedulePaint(); } - } else if (type == NotificationType::UPGRADE_RECOMMENDED) { + } else if (type == NotificationType::UPGRADE_RECOMMENDED || + type == NotificationType::MODULE_INCOMPATIBILITY_BADGE_CHANGE) { UpdateAppMenuBadge(); - } else if (type == NotificationType::MODULE_INCOMPATIBILITY_DETECTED) { - bool confirmed_bad = *Details<bool>(details).ptr(); - if (confirmed_bad) - UpdateAppMenuBadge(); } } @@ -624,7 +621,7 @@ bool ToolbarView::IsUpgradeRecommended() { bool ToolbarView::ShouldShowIncompatibilityWarning() { #if defined(OS_WIN) EnumerateModulesModel* loaded_modules = EnumerateModulesModel::GetInstance(); - return loaded_modules->confirmed_bad_modules_detected() > 0; + return loaded_modules->ShouldShowConflictWarning(); #else return false; #endif diff --git a/content/common/notification_type.h b/content/common/notification_type.h index f607640..c704567 100644 --- a/content/common/notification_type.h +++ b/content/common/notification_type.h @@ -1080,10 +1080,9 @@ class NotificationType { // other modules of interest). No details are expected. MODULE_LIST_ENUMERATED, - // Sent when Chrome detects an incompatible module. Details is a boolean - // specifying true if one or more confirmed bad modules were found or false - // if only suspected bad modules were found. - MODULE_INCOMPATIBILITY_DETECTED, + // Sent when Chrome is done scanning the module list and when the user has + // acknowledged the module incompatibility. No details are expected. + MODULE_INCOMPATIBILITY_BADGE_CHANGE, // Background App Tracking Notifications ----------------------------------- // Sent when the state of the background page tracker has changed (the |