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

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

Issue 2720513005: Add InspectModule() that returns a populated ModuleInspectionResult struct (Closed)
Patch Set: Another Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/conflicts/module_info_util_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/conflicts/module_info_util_win.h
diff --git a/chrome/browser/conflicts/module_info_util_win.h b/chrome/browser/conflicts/module_info_util_win.h
index 9b3e51819fbcebbe5db11eac745482bcb25e669c..6d002ae76d540302898c8666b43697d0cb2bd7e1 100644
--- a/chrome/browser/conflicts/module_info_util_win.h
+++ b/chrome/browser/conflicts/module_info_util_win.h
@@ -5,6 +5,9 @@
#ifndef CHROME_BROWSER_CONFLICTS_MODULE_INFO_UTIL_WIN_H_
#define CHROME_BROWSER_CONFLICTS_MODULE_INFO_UTIL_WIN_H_
+#include <utility>
+#include <vector>
+
#include "base/files/file_path.h"
#include "base/strings/string16.h"
@@ -40,4 +43,21 @@ struct CertificateInfo {
void GetCertificateInfo(const base::FilePath& file,
CertificateInfo* certificate_info);
+// Returns a mapping of the value of an environment variable to its name.
+// Removes any existing trailing backslash in the values.
+//
+// e.g. c:\windows\system32 -> %systemroot%
+using StringMapping = std::vector<std::pair<base::string16, base::string16>>;
+StringMapping GetEnvironmentVariablesMapping(
+ const std::vector<base::string16>& environment_variables);
+
+// If |prefix_mapping| contains a matching prefix with |path|, substitutes that
+// prefix with its associated value. If multiple matches are found, the longest
+// prefix is chosen. Unmodified if no matches are found.
+//
+// This function expects |prefix_mapping| and |path| to contain lowercase
+// strings. Also, |prefix_mapping| must not contain any trailing backslashes.
+void CollapseMatchingPrefixInPath(const StringMapping& prefix_mapping,
+ base::string16* path);
+
#endif // CHROME_BROWSER_CONFLICTS_MODULE_INFO_UTIL_WIN_H_
« no previous file with comments | « no previous file | chrome/browser/conflicts/module_info_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698