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

Unified Diff: minidump/crashpad_dbghelp.h

Issue 883773005: win: Work towards getting 'minidump' to compile (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@crash-report-db-win
Patch Set: . Created 5 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: 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_
« no previous file with comments | « compat/win/sys/types.h ('k') | minidump/crashpad_winnt.h » ('j') | minidump/minidump_context.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698