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

Unified Diff: chrome/app/chrome_crash_reporter_client.cc

Issue 1852393002: Fix stack symbolization in Telemetry on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable stacktrace_unittest on Windows again. Created 4 years, 8 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 | « DEPS ('k') | chrome/breakpad.isolate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_crash_reporter_client.cc
diff --git a/chrome/app/chrome_crash_reporter_client.cc b/chrome/app/chrome_crash_reporter_client.cc
index deec30509c77abc223cfbb55320259a7f9c4a3e7..335f2780e20663379d6bfd0eae36d9496884254a 100644
--- a/chrome/app/chrome_crash_reporter_client.cc
+++ b/chrome/app/chrome_crash_reporter_client.cc
@@ -282,11 +282,6 @@ base::FilePath ChromeCrashReporterClient::GetReporterLogFilename() {
bool ChromeCrashReporterClient::GetCrashDumpLocation(
base::FilePath* crash_dir) {
-#if defined(OS_WIN)
- // TODO(scottmg): Consider supporting --user-data-dir. See
- // https://crbug.com/565446.
- return chrome::GetDefaultCrashDumpLocation(crash_dir);
-#else
// By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate
// location to write breakpad crash dumps can be set.
scoped_ptr<base::Environment> env(base::Environment::Create());
@@ -294,9 +289,24 @@ bool ChromeCrashReporterClient::GetCrashDumpLocation(
if (env->GetVar("BREAKPAD_DUMP_LOCATION", &alternate_crash_dump_location)) {
base::FilePath crash_dumps_dir_path =
base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location);
+
+#if defined(OS_WIN)
+ // If this environment variable exists, then for the time being,
+ // short-circuit how it's handled on Windows. Honoring this
+ // variable is required in order to symbolize stack traces in
+ // Telemetry based tests: http://crbug.com/561763.
+ *crash_dir = crash_dumps_dir_path;
+ return true;
+#else
PathService::Override(chrome::DIR_CRASH_DUMPS, crash_dumps_dir_path);
+#endif
}
+#if defined(OS_WIN)
+ // TODO(scottmg): Consider supporting --user-data-dir. See
+ // https://crbug.com/565446.
+ return chrome::GetDefaultCrashDumpLocation(crash_dir);
+#else
return PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir);
#endif
}
« no previous file with comments | « DEPS ('k') | chrome/breakpad.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698