Index: minidump/crashpad_dbghelp.h |
diff --git a/util/test/executable_path_win.cc b/minidump/crashpad_dbghelp.h |
similarity index 62% |
copy from util/test/executable_path_win.cc |
copy to minidump/crashpad_dbghelp.h |
index 024478d7552d5a0a3cdb03e5f686d193549b2ee3..203ff64f8324a5b5093022c5dbb295ebd6987e26 100644 |
--- a/util/test/executable_path_win.cc |
+++ b/minidump/crashpad_dbghelp.h |
@@ -12,18 +12,18 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#include "util/test/executable_path.h" |
+#ifndef CRASHPAD_MINIDUMP_CRASHPAD_DBGHELP_H_ |
+#define CRASHPAD_MINIDUMP_CRASHPAD_DBGHELP_H_ |
-#include <windows.h> |
+#include "build/build_config.h" |
+ |
+// dbghelp.h requires windows.h to be included before it, so instead of |
Mark Mentovai
2015/02/02 23:32:08
Other option: deal with this in compat/win and use
scottmg
2015/02/03 18:12:56
Maybe that's better. It seems a bit weird to have
Mark Mentovai
2015/02/03 18:26:32
I’ll leave it up to your discretion. All of the op
scottmg
2015/02/03 19:22:44
I went with adding an empty non_win/windows.h as i
|
+// including dbghelp.h directly, we always include crashpad_dbghelp.h instead. |
-namespace crashpad { |
-namespace test { |
+#if defined(OS_WIN) |
+#include <windows.h> |
+#endif // OS_WIN |
-base::FilePath ExecutablePath() { |
- wchar_t executable_path[_MAX_PATH]; |
- GetModuleFileName(nullptr, executable_path, sizeof(executable_path)); |
- return base::FilePath(executable_path); |
-} |
+#include <dbghelp.h> |
-} // namespace test |
-} // namespace crashpad |
+#endif // CRASHPAD_CRASHPAD_MINIDUMP_CRASHPAD_DBGHELP_H_ |