Index: minidump/crashpad_winnt.h |
diff --git a/util/test/executable_path_win.cc b/minidump/crashpad_winnt.h |
similarity index 62% |
copy from util/test/executable_path_win.cc |
copy to minidump/crashpad_winnt.h |
index 024478d7552d5a0a3cdb03e5f686d193549b2ee3..fee21f544caf884c641428c134ec8e71ef22e84b 100644 |
--- a/util/test/executable_path_win.cc |
+++ b/minidump/crashpad_winnt.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_WINNT_H_ |
+#define CRASHPAD_MINIDUMP_CRASHPAD_WINNT_H_ |
-#include <windows.h> |
+#include "build/build_config.h" |
+ |
+// winnt.h requires windows.h to be included before it, so instead of |
+// including winnt.h directly, we always include crashpad_winnt.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 <winnt.h> |
-} // namespace test |
-} // namespace crashpad |
+#endif // CRASHPAD_CRASHPAD_MINIDUMP_CRASHPAD_WINNT_H_ |