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

Unified Diff: util/win/module_version.h

Issue 1126273003: win: Retrieve module version/type information (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@thread-context-fixes
Patch Set: rebase Created 5 years, 7 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.gyp ('k') | util/win/module_version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/module_version.h
diff --git a/util/win/time.h b/util/win/module_version.h
similarity index 50%
copy from util/win/time.h
copy to util/win/module_version.h
index 7cc0094f35e2d28d32c1acaf40e57ea533011a2b..e7d37692bcacad6c46fecfa0fa4b5fdca539e496 100644
--- a/util/win/time.h
+++ b/util/win/module_version.h
@@ -12,25 +12,26 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef CRASHPAD_UTIL_WIN_TIME_H_
-#define CRASHPAD_UTIL_WIN_TIME_H_
+#ifndef CRASHPAD_UTIL_WIN_MODULE_VERSION_H_
+#define CRASHPAD_UTIL_WIN_MODULE_VERSION_H_
-#include <sys/time.h>
#include <windows.h>
-namespace crashpad {
-
-//! \brief Convert Windows `FILETIME` to `timeval`, converting from Windows
-//! epoch to POSIX epoch.
-timeval FiletimeToTimevalEpoch(const FILETIME& filetime);
+#include "base/files/file_path.h"
-//! \brief Convert Windows `FILETIME` to `timeval`, treating the values as
-//! an interval of elapsed time.
-timeval FiletimeToTimevalInterval(const FILETIME& filetime);
+namespace crashpad {
-//! \brief Similar to POSIX gettimeofday(), gets the current system time in UTC.
-void GetTimeOfDay(timeval* tv);
+//! \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.
+//!
+//! \return `true` on success, or `false` on failure with a message logged.
+bool GetModuleVersionAndType(const base::FilePath& path,
+ VS_FIXEDFILEINFO* vs_fixedfileinfo);
} // namespace crashpad
-#endif // CRASHPAD_UTIL_WIN_TIME_H_
+#endif // CRASHPAD_UTIL_WIN_MODULE_VERSION_H_
« no previous file with comments | « util/util.gyp ('k') | util/win/module_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698