Index: util/win/critical_section_with_debug_info.h |
diff --git a/util/win/module_version.h b/util/win/critical_section_with_debug_info.h |
similarity index 55% |
copy from util/win/module_version.h |
copy to util/win/critical_section_with_debug_info.h |
index e7d37692bcacad6c46fecfa0fa4b5fdca539e496..12716857557391b48580568a48379e8014b4ad47 100644 |
--- a/util/win/module_version.h |
+++ b/util/win/critical_section_with_debug_info.h |
@@ -12,26 +12,23 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#ifndef CRASHPAD_UTIL_WIN_MODULE_VERSION_H_ |
-#define CRASHPAD_UTIL_WIN_MODULE_VERSION_H_ |
+#ifndef CRASHPAD_UTIL_WIN_CRITICAL_SECTION_WITH_DEBUG_INFO_H_ |
+#define CRASHPAD_UTIL_WIN_CRITICAL_SECTION_WITH_DEBUG_INFO_H_ |
#include <windows.h> |
-#include "base/files/file_path.h" |
- |
namespace crashpad { |
-//! \brief Retrieve the type and version information from a given module (exe, |
-//! dll, etc.) |
-//! |
-//! \param[in] path The path to the module to be inspected. |
-//! \param[out] vs_fixedfileinfo The VS_FIXEDFILEINFO on success. `dwFileFlags` |
-//! will have been masked with `dwFileFlagsMask` already. |
+//! \brief Equivalent to `InitializeCritialSection()`, but attempts to allocate |
+//! with a valid `.DebugInfo` field on versions of Windows where it's |
+//! possible to do so. |
//! |
//! \return `true` on success, or `false` on failure with a message logged. |
-bool GetModuleVersionAndType(const base::FilePath& path, |
- VS_FIXEDFILEINFO* vs_fixedfileinfo); |
+//! Success means that the critical section was successfully initialized, |
+//! but it does not necessarily have a valid `.DebugInfo` field. |
+bool InitializeCriticalSectionWithDebugInfoIfPossible( |
+ CRITICAL_SECTION* critical_section); |
} // namespace crashpad |
-#endif // CRASHPAD_UTIL_WIN_MODULE_VERSION_H_ |
+#endif // CRASHPAD_UTIL_WIN_CRITICAL_SECTION_WITH_DEBUG_INFO_H_ |