Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: chrome/browser/enumerate_modules_model_win.h

Issue 5278012: EnumerateModules: Address UI review comments.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 11 matching lines...) Expand all
22 22
23 // A helper class that implements the enumerate module functionality on the File 23 // A helper class that implements the enumerate module functionality on the File
24 // thread. 24 // thread.
25 class ModuleEnumerator : public base::RefCountedThreadSafe<ModuleEnumerator> { 25 class ModuleEnumerator : public base::RefCountedThreadSafe<ModuleEnumerator> {
26 public: 26 public:
27 // What type of module we are dealing with. Loaded modules are modules we 27 // What type of module we are dealing with. Loaded modules are modules we
28 // detect as loaded in the process at the time of scanning. The others are 28 // detect as loaded in the process at the time of scanning. The others are
29 // modules of interest and may or may not be loaded in the process at the 29 // modules of interest and may or may not be loaded in the process at the
30 // time of scan. 30 // time of scan.
31 enum ModuleType { 31 enum ModuleType {
32 LOADED_MODULE, 32 LOADED_MODULE = 1 << 0,
33 SHELL_EXTENSION, 33 SHELL_EXTENSION = 1 << 1,
34 WINSOCK_MODULE_REGISTRATION, 34 WINSOCK_MODULE_REGISTRATION = 1 << 2,
35 }; 35 };
36 36
37 // The blacklist status of the module. Suspected Bad modules have been 37 // The blacklist status of the module. Suspected Bad modules have been
38 // partially matched (ie. name matches and location, but not description) 38 // partially matched (ie. name matches and location, but not description)
39 // whereas Confirmed Bad modules have been identified further (ie. 39 // whereas Confirmed Bad modules have been identified further (ie.
40 // AuthentiCode signer matches). 40 // AuthentiCode signer matches).
41 enum ModuleStatus { 41 enum ModuleStatus {
42 // This is returned by the matching function when comparing against the 42 // This is returned by the matching function when comparing against the
43 // blacklist and the module does not match the current entry in the 43 // blacklist and the module does not match the current entry in the
44 // blacklist. 44 // blacklist.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 }; 89 };
90 90
91 // A vector typedef of all modules enumerated. 91 // A vector typedef of all modules enumerated.
92 typedef std::vector<Module> ModulesVector; 92 typedef std::vector<Module> ModulesVector;
93 93
94 // A structure we populate with the blacklist entries. 94 // A structure we populate with the blacklist entries.
95 struct BlacklistEntry { 95 struct BlacklistEntry {
96 const char* filename; 96 const char* filename;
97 const char* location; 97 const char* location;
98 const char* desc_or_signer; 98 const char* desc_or_signer;
99 const char* version_from; 99 const char* version_from; // Version where conflict started.
100 const char* version_to; 100 const char* version_to; // First version that works.
101 RecommendedAction help_tip; 101 RecommendedAction help_tip;
102 }; 102 };
103 103
104 // A static function that normalizes the module information in the |module| 104 // A static function that normalizes the module information in the |module|
105 // struct. Module information needs to be normalized before comparing against 105 // struct. Module information needs to be normalized before comparing against
106 // the blacklist. This is because the same module can be described in many 106 // the blacklist. This is because the same module can be described in many
107 // different ways, ie. file paths can be presented in long/short name form, 107 // different ways, ie. file paths can be presented in long/short name form,
108 // and are not case sensitive on Windows. Also, the version string returned 108 // and are not case sensitive on Windows. Also, the version string returned
109 // can include appended text, which we don't want to use during comparison 109 // can include appended text, which we don't want to use during comparison
110 // against the blacklist. 110 // against the blacklist.
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 int confirmed_bad_modules_detected_; 275 int confirmed_bad_modules_detected_;
276 276
277 // The number of suspected bad modules (not including confirmed bad ones) 277 // The number of suspected bad modules (not including confirmed bad ones)
278 // found during last scan. 278 // found during last scan.
279 int suspected_bad_modules_detected_; 279 int suspected_bad_modules_detected_;
280 280
281 DISALLOW_COPY_AND_ASSIGN(EnumerateModulesModel); 281 DISALLOW_COPY_AND_ASSIGN(EnumerateModulesModel);
282 }; 282 };
283 283
284 #endif // CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ 284 #endif // CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698