| Index: chromecast/browser/cast_browser_main_parts.cc
|
| diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
|
| index e7bcbc9e175289a0d4e0d4050a80efa30784241c..263d5955bc5ea28f18f848930de16a088aa990dc 100644
|
| --- a/chromecast/browser/cast_browser_main_parts.cc
|
| +++ b/chromecast/browser/cast_browser_main_parts.cc
|
| @@ -168,12 +168,21 @@ void CastBrowserMainParts::PostMainMessageLoopStart() {
|
| }
|
|
|
| int CastBrowserMainParts::PreCreateThreads() {
|
| -#if !defined(OS_ANDROID)
|
| +#if defined(OS_ANDROID)
|
| + // GPU process is started immediately after threads are created, requiring
|
| + // CrashDumpManager to be initialized beforehand.
|
| + base::FilePath crash_dumps_dir;
|
| + if (!chromecast::CrashHandler::GetCrashDumpLocation(&crash_dumps_dir)) {
|
| + LOG(ERROR) << "Could not find crash dump location.";
|
| + }
|
| + cast_browser_process_->SetCrashDumpManager(
|
| + make_scoped_ptr(new breakpad::CrashDumpManager(crash_dumps_dir)));
|
| +#else
|
| base::FilePath home_dir;
|
| CHECK(PathService::Get(DIR_CAST_HOME, &home_dir));
|
| if (!base::CreateDirectory(home_dir))
|
| return 1;
|
| -#endif // !defined(OS_ANDROID)
|
| +#endif
|
| return 0;
|
| }
|
|
|
| @@ -199,15 +208,6 @@ void CastBrowserMainParts::PreMainMessageLoopRun() {
|
| cast_browser_process_->pref_service(),
|
| cast_browser_process_->browser_context()->GetRequestContext()));
|
|
|
| -#if defined(OS_ANDROID)
|
| - base::FilePath crash_dumps_dir;
|
| - if (!chromecast::CrashHandler::GetCrashDumpLocation(&crash_dumps_dir)) {
|
| - LOG(ERROR) << "Could not find crash dump location.";
|
| - }
|
| - cast_browser_process_->SetCrashDumpManager(
|
| - make_scoped_ptr(new breakpad::CrashDumpManager(crash_dumps_dir)));
|
| -#endif
|
| -
|
| if (!PlatformClientAuth::Initialize())
|
| LOG(ERROR) << "PlatformClientAuth::Initialize failed.";
|
|
|
|
|