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

Unified Diff: chrome/browser/conflicts/module_info_win.h

Issue 2720513005: Add InspectModule() that returns a populated ModuleInspectionResult struct (Closed)
Patch Set: a Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/conflicts/module_info_win.h
diff --git a/chrome/browser/conflicts/module_info_win.h b/chrome/browser/conflicts/module_info_win.h
index 368bfd79f956b730d1c700565d793825967d9e7b..8ecccd81d4ecee31b8ef4961fd88bb8ac3ec239c 100644
--- a/chrome/browser/conflicts/module_info_win.h
+++ b/chrome/browser/conflicts/module_info_win.h
@@ -51,6 +51,10 @@ struct ModuleInfoData {
ModuleInfoData(const ModuleInfoData& others);
~ModuleInfoData();
+ // Used to copy a ModuleInfoData returned by InspectModule() into an empty,
+ // existing one.
+ void CopyInspectionData(const ModuleInfoData& other);
chrisha 2017/02/28 18:51:29 How about just a plain old operator=? Or pass a Mo
Patrick Monette 2017/02/28 23:37:38 I definitely don't like my current approach. Let m
chrisha 2017/03/01 15:45:42 Yeah, having a separate section of ModuleInspectio
Patrick Monette 2017/03/02 20:27:07 Done.
+
// Set of all process types in which this module has been seen (may not be
// currently present in a process of that type). This is a conversion of
// ProcessType enumeration to a bitfield. See "ProcessTypeToBit" and
@@ -60,6 +64,9 @@ struct ModuleInfoData {
// The following pieces of information are determined via a detailed
// inspection of the module.
+ // Indicates if the module has been inspected.
+ bool inspected;
+
// The module path, not including the basename. This is cleaned and normalized
// so that common paths are converted to their environment variable mappings
// (ie, %systemroot%). This makes i18n localized paths easily comparable.
@@ -82,4 +89,10 @@ struct ModuleInfoData {
CertificateInfo certificate_info;
};
+// Given a module identified by |module_key|, returns a populated ModuleInfoData
+// that contains detailed information about the module on disk. This is a
+// blocking task that requires access to disk.
+ModuleInfoData InspectModule(const StringMapping& env_variable_mapping,
+ const ModuleInfoKey& module_key);
+
#endif // CHROME_BROWSER_CONFLICTS_MODULE_INFO_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698