Chromium Code Reviews| 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 |
| } |