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 2663a08017ad0aef4a048deeffd8eb441465f9f1..7db58f0f151b6abb8d22eea8745abbbf6a040f68 100644 |
| --- a/chrome/app/chrome_crash_reporter_client.cc |
| +++ b/chrome/app/chrome_crash_reporter_client.cc |
| @@ -16,6 +16,7 @@ |
| #include "chrome/common/chrome_result_codes.h" |
| #include "chrome/common/crash_keys.h" |
| #include "chrome/common/env_vars.h" |
| +#include "chrome/installer/util/browser_distribution.h" |
| #include "chrome/installer/util/google_update_settings.h" |
| #include "content/public/common/content_switches.h" |
| @@ -278,6 +279,22 @@ base::FilePath ChromeCrashReporterClient::GetReporterLogFilename() { |
| bool ChromeCrashReporterClient::GetCrashDumpLocation( |
| base::FilePath* crash_dir) { |
| +#if defined(OS_WIN) |
| + // In order to be able to start crash handling very early, we do not rely on |
| + // chrome's PathService entries (for DIR_CRASH_DUMPS) being available on |
| + // Windows. See http://crbug.com/564398. |
| + base::FilePath result; |
| + if (!PathService::Get(base::DIR_LOCAL_APP_DATA, &result)) |
| + return false; |
| + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
|
cpu_(ooo_6.6-7.5)
2015/12/03 20:53:27
no need for delete dist; ?
also, are you trying t
scottmg
2015/12/03 21:06:22
The code's a bit weird, but I don't think so. http
|
| + result = result.Append(dist->GetInstallSubDir()); |
| + // TODO(scottmg): Consider supporting --user-data-dir. See |
| + // http://crbug.com/565466. |
|
Mark Mentovai
2015/12/03 20:35:42
Wrong bug number (466 v. 446). Also, you should us
scottmg
2015/12/03 20:52:52
Oops. I swear https didn't work with crbug.com bef
|
| + result = result.Append(chrome::kUserDataDirname); |
| + result = result.Append(FILE_PATH_LITERAL("Crashpad")); |
| + *crash_dir = result; |
| + return true; |
| +#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()); |
| @@ -289,6 +306,7 @@ bool ChromeCrashReporterClient::GetCrashDumpLocation( |
| } |
| return PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir); |
| +#endif |
| } |
| size_t ChromeCrashReporterClient::RegisterCrashKeys() { |