Chromium Code Reviews| 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..21699d5a97a6cb9e13c599ea4c71338e96b17f67 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,18 @@ struct CertificateInfo { |
| void GetCertificateInfo(const base::FilePath& file, |
| CertificateInfo* certificate_info); |
| +// Returns a mapping of the value of an environment variable to its name. |
| +// |
| +// 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); |
| + |
| +// Given a mapping of prefixes to their respective substitution values, searches |
| +// for a matching prefix in |string| that contains a mapping in |prefix_mapping| |
| +// and replaces it with its associated value. This function goes over all the |
| +// values in the mapping to ensure the best fit is chosen. |
|
chrisha
2017/02/28 18:51:29
Not the best wording? Maybe an example as well?
Patrick Monette
2017/02/28 23:37:38
I've reworded this and I think an example is not n
|
| +void CollapseMatchingPrefixInString(const StringMapping& prefix_mapping, |
| + base::string16* string); |
| + |
| #endif // CHROME_BROWSER_CONFLICTS_MODULE_INFO_UTIL_WIN_H_ |