| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ | 5 #ifndef CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ |
| 6 #define CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ | 6 #define CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // and are not case sensitive on Windows. Also, the version string returned | 105 // and are not case sensitive on Windows. Also, the version string returned |
| 106 // can include appended text, which we don't want to use during comparison | 106 // can include appended text, which we don't want to use during comparison |
| 107 // against the blacklist. | 107 // against the blacklist. |
| 108 static void NormalizeModule(Module* module); | 108 static void NormalizeModule(Module* module); |
| 109 | 109 |
| 110 // A static function that checks whether |module| has been |blacklisted|. | 110 // A static function that checks whether |module| has been |blacklisted|. |
| 111 static ModuleStatus Match(const Module& module, | 111 static ModuleStatus Match(const Module& module, |
| 112 const BlacklistEntry& blacklisted); | 112 const BlacklistEntry& blacklisted); |
| 113 | 113 |
| 114 explicit ModuleEnumerator(EnumerateModulesModel* observer); | 114 explicit ModuleEnumerator(EnumerateModulesModel* observer); |
| 115 virtual ~ModuleEnumerator(); | 115 ~ModuleEnumerator(); |
| 116 | 116 |
| 117 // Start scanning the loaded module list (if a scan is not already in | 117 // Start scanning the loaded module list (if a scan is not already in |
| 118 // progress). This function does not block while reading the module list, but | 118 // progress). This function does not block while reading the module list, but |
| 119 // will notify when done through the MODULE_LIST_ENUMERATED notification. | 119 // will notify when done through the MODULE_LIST_ENUMERATED notification. |
| 120 // The process will also send MODULE_INCOMPATIBILITY_DETECTED if an | 120 // The process will also send MODULE_INCOMPATIBILITY_DETECTED if an |
| 121 // incompatible module was detected. | 121 // incompatible module was detected. |
| 122 void ScanNow(ModulesVector* list); | 122 void ScanNow(ModulesVector* list); |
| 123 | 123 |
| 124 private: | 124 private: |
| 125 // The (currently) hard coded blacklist of known bad modules. | 125 // The (currently) hard coded blacklist of known bad modules. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 int confirmed_bad_modules_detected_; | 250 int confirmed_bad_modules_detected_; |
| 251 | 251 |
| 252 // The number of suspected bad modules (not including confirmed bad ones) | 252 // The number of suspected bad modules (not including confirmed bad ones) |
| 253 // found during last scan. | 253 // found during last scan. |
| 254 int suspected_bad_modules_detected_; | 254 int suspected_bad_modules_detected_; |
| 255 | 255 |
| 256 DISALLOW_COPY_AND_ASSIGN(EnumerateModulesModel); | 256 DISALLOW_COPY_AND_ASSIGN(EnumerateModulesModel); |
| 257 }; | 257 }; |
| 258 | 258 |
| 259 #endif // CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ | 259 #endif // CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ |
| OLD | NEW |