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

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: 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 | « no previous file | chrome/breakpad.isolate » ('j') | chrome/chrome_tests.gypi » ('J')
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..f66fa98a592825f69e4baae767668058236ccea3 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,22 @@ 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.
+ *crash_dir = crash_dumps_dir_path;
scottmg 2016/04/04 19:22:02 Is this directory guaranteed to exist? PathService
Ken Russell (switch to Gerrit) 2016/04/04 20:26:44 Not currently guaranteed by this code, no. The cu
scottmg 2016/04/04 21:04:58 I don't think PathService can be used, in general,
Ken Russell (switch to Gerrit) 2016/04/04 21:59:25 OK. Can we proceed with this change as written the
scottmg 2016/04/04 22:12:04 OK, lgtm with a comment saying why we need to (tel
+ 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 | « no previous file | chrome/breakpad.isolate » ('j') | chrome/chrome_tests.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698