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

Unified Diff: util/win/get_module_information.h

Issue 1586433003: Adding an API to read module annotations in snapshot.gyp (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Add test and fix nits. Created 4 years, 11 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/get_module_information.h
diff --git a/util/win/scoped_local_alloc.h b/util/win/get_module_information.h
similarity index 54%
copy from util/win/scoped_local_alloc.h
copy to util/win/get_module_information.h
index b46078523ed473e46a06d4569f921ddddabe366e..9e6e379b6111e104b512ad6089fda3f424ff50f0 100644
--- a/util/win/scoped_local_alloc.h
+++ b/util/win/get_module_information.h
@@ -1,4 +1,4 @@
-// Copyright 2015 The Crashpad Authors. All rights reserved.
+// Copyright 2016 The Crashpad Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,27 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef CRASHPAD_UTIL_WIN_SCOPED_LOCAL_ALLOC_H_
-#define CRASHPAD_UTIL_WIN_SCOPED_LOCAL_ALLOC_H_
+#ifndef CRASHPAD_UTIL_WIN_GET_MODULE_INFORMATION_H_
+#define CRASHPAD_UTIL_WIN_GET_MODULE_INFORMATION_H_
#include <windows.h>
-#include "base/scoped_generic.h"
+#define PSAPI_VERSION 1
+#include <psapi.h>
namespace crashpad {
-namespace internal {
-
-struct LocalAllocTraits {
- static HLOCAL InvalidValue() { return nullptr; }
- static void Free(HLOCAL mem);
-};
-
-} // namespace internal
-
-using ScopedLocalAlloc =
- base::ScopedGeneric<HLOCAL, internal::LocalAllocTraits>;
+//! \brief Proxy function for GetModuleInformation.
scottmg 2016/01/18 17:11:59 Doxygen doesn't know about GetModuleInformation, s
Patrick Monette 2016/01/18 19:35:44 Done.
+BOOL CrashpadGetModuleInformation(HANDLE process,
+ HMODULE module,
+ MODULEINFO* module_info,
+ DWORD cb);
} // namespace crashpad
-#endif // CRASHPAD_UTIL_WIN_SCOPED_LOCAL_ALLOC_H_
+#endif // CRASHPAD_UTIL_WIN_GET_MODULE_INFORMATION_H_

Powered by Google App Engine
This is Rietveld 408576698