Chromium Code Reviews| Index: chrome/app/chrome_crash_reporter_client_win.cc |
| diff --git a/chrome/app/chrome_crash_reporter_client_win.cc b/chrome/app/chrome_crash_reporter_client_win.cc |
| index 166a13df213ba18e27c5b895c40dd31f932cb6e6..78dc79ef3a9d1c9c0c1cd5a124f49441158bb68f 100644 |
| --- a/chrome/app/chrome_crash_reporter_client_win.cc |
| +++ b/chrome/app/chrome_crash_reporter_client_win.cc |
| @@ -14,6 +14,7 @@ |
| #include <iterator> |
| #include <memory> |
| #include <string> |
| +#include <vector> |
| #include "base/command_line.h" |
| #include "base/debug/crash_logging.h" |
| @@ -21,6 +22,7 @@ |
| #include "base/format_macros.h" |
| #include "base/rand_util.h" |
| #include "chrome/common/chrome_result_codes.h" |
| +#include "chrome/install_static/install_details.h" |
| #include "chrome/install_static/install_util.h" |
| #include "chrome/install_static/user_data_dir.h" |
| #include "components/crash/content/app/crashpad.h" |
| @@ -240,13 +242,16 @@ void ChromeCrashReporterClient::InitializeCrashReportingForProcess() { |
| std::wstring process_type = install_static::GetSwitchValueFromCommandLine( |
| ::GetCommandLine(), install_static::kProcessType); |
| + std::wstring user_data_dir = |
| + install_static::InstallDetails::Get().user_data_dir(); |
|
grt (UTC plus 2)
2017/05/19 08:15:50
since this is such a mouthful, i've been putting h
manzagop (departed)
2017/05/19 22:02:06
Done.
|
| // Don't set up Crashpad crash reporting in the Crashpad handler itself, nor |
| // in the fallback crash handler for the Crashpad handler process. |
| if (process_type != install_static::kCrashpadHandler && |
| process_type != install_static::kFallbackHandler) { |
| crash_reporter::SetCrashReporterClient(instance); |
| crash_reporter::InitializeCrashpadWithEmbeddedHandler( |
| - process_type.empty(), install_static::UTF16ToUTF8(process_type)); |
| + process_type.empty(), install_static::UTF16ToUTF8(process_type), |
| + install_static::UTF16ToUTF8(user_data_dir)); |
| } |
| } |
| #endif // NACL_WIN64 |
| @@ -359,7 +364,8 @@ bool ChromeCrashReporterClient::GetCrashDumpLocation( |
| bool ChromeCrashReporterClient::GetCrashMetricsLocation( |
| base::string16* metrics_dir) { |
| - return install_static::GetUserDataDirectory(metrics_dir, nullptr); |
| + *metrics_dir = install_static::InstallDetails::Get().user_data_dir(); |
| + return true; |
| } |
| // TODO(ananta) |