Chromium Code Reviews| Index: chromecast/shell/app/cast_main_delegate.cc |
| diff --git a/chromecast/shell/app/cast_main_delegate.cc b/chromecast/shell/app/cast_main_delegate.cc |
| index 719cc2b719d69b6b9162ee63f2b43121564dbe24..e3dbfc103d70b2c21aac19e707e3c94f8f4b41c3 100644 |
| --- a/chromecast/shell/app/cast_main_delegate.cc |
| +++ b/chromecast/shell/app/cast_main_delegate.cc |
| @@ -4,6 +4,7 @@ |
| #include "chromecast/shell/app/cast_main_delegate.h" |
| +#include "base/command_line.h" |
| #include "base/cpu.h" |
| #include "base/logging.h" |
| #include "base/path_service.h" |
| @@ -17,6 +18,10 @@ |
| #include "content/public/common/content_switches.h" |
| #include "ui/base/resource/resource_bundle.h" |
| +#if defined(OS_ANDROID) |
| +#include "chromecast/crash/android/crash_handler.h" |
| +#endif // defined(OS_ANDROID) |
| + |
| namespace chromecast { |
| namespace shell { |
| @@ -56,6 +61,16 @@ void CastMainDelegate::PreSandboxStartup() { |
| base::CPU cpu_info; |
| #endif |
| + const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess()); |
| + std::string process_type = |
| + command_line->GetSwitchValueASCII(switches::kProcessType); |
| + |
| +#if defined(OS_ANDROID) |
| + base::FilePath log_file; |
| + PathService::Get(FILE_CAST_ANDROID_LOG, &log_file); |
| + chromecast::CrashHandler::Initialize(process_type, log_file); |
|
Lei Zhang
2014/10/06 22:44:25
Can CrashHandler handle an empty |log_file| ?
gunsch
2014/10/09 00:20:56
I believe that should be okay, we haven't had any
|
| +#endif // defined(OS_ANDROID) |
| + |
| InitializeResourceBundle(); |
| } |