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

Unified Diff: util/win/critical_section_with_debug_info.h

Issue 1405243002: Fix CRITICAL_SECTION test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: comment Created 5 years, 2 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: 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 56%
copy from util/win/module_version.h
copy to util/win/critical_section_with_debug_info.h
index e7d37692bcacad6c46fecfa0fa4b5fdca539e496..5420daa33be291118b91f512d84be6d1de978697 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
Mark Mentovai 2015/10/16 21:47:41 Hanging indent.
scottmg 2015/10/16 21:53:45 Done.
+//! 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_

Powered by Google App Engine
This is Rietveld 408576698