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

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: . 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
« no previous file with comments | « util/util_test.gyp ('k') | util/win/critical_section_with_debug_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « util/util_test.gyp ('k') | util/win/critical_section_with_debug_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698