Commit 29f0b44f authored by Xi Cheng's avatar Xi Cheng Committed by Commit Bot

Start crashpad as early as possible in notification_helper.exe

Bug: 734095
Change-Id: Id6812f667fffe493e5f846e59fa7783d104bb930
Reviewed-on: https://chromium-review.googlesource.com/993399Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Commit-Queue: Xi Cheng <chengx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548135}
parent 6573295f
...@@ -43,18 +43,11 @@ extern "C" int WINAPI wWinMain(HINSTANCE instance, ...@@ -43,18 +43,11 @@ extern "C" int WINAPI wWinMain(HINSTANCE instance,
return 0; return 0;
} }
install_static::InitializeProductDetailsForPrimaryModule();
// The histogram storage folder should be under folder "User Data".
base::string16 user_data_dir;
install_static::GetUserDataDirectory(&user_data_dir, nullptr);
persistent_histogram_storage.set_storage_base_dir(
base::FilePath(std::move(user_data_dir)));
// The exit manager is in charge of calling the dtors of singletons. // The exit manager is in charge of calling the dtors of singletons.
base::AtExitManager exit_manager; base::AtExitManager exit_manager;
install_static::InitializeProductDetailsForPrimaryModule();
// Use crashpad embedded in chrome.exe as the crash handler. // Use crashpad embedded in chrome.exe as the crash handler.
base::FilePath chrome_exe_path = notification_helper::GetChromeExePath(); base::FilePath chrome_exe_path = notification_helper::GetChromeExePath();
if (!chrome_exe_path.empty()) { if (!chrome_exe_path.empty()) {
...@@ -62,6 +55,13 @@ extern "C" int WINAPI wWinMain(HINSTANCE instance, ...@@ -62,6 +55,13 @@ extern "C" int WINAPI wWinMain(HINSTANCE instance,
InitializeCrashReportingForProcessWithHandler(chrome_exe_path); InitializeCrashReportingForProcessWithHandler(chrome_exe_path);
} }
// The histogram storage folder should be under folder "User Data".
base::string16 user_data_dir;
install_static::GetUserDataDirectory(&user_data_dir, nullptr);
persistent_histogram_storage.set_storage_base_dir(
base::FilePath(std::move(user_data_dir)));
// Make sure the process exits cleanly on unexpected errors. // Make sure the process exits cleanly on unexpected errors.
base::EnableTerminationOnHeapCorruption(); base::EnableTerminationOnHeapCorruption();
base::EnableTerminationOnOutOfMemory(); base::EnableTerminationOnOutOfMemory();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment