Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: chromecast/shell/app/cast_main_delegate.cc

Issue 620673003: Chromecast: adds crash handling for Android build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address lei's comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/shell/app/DEPS ('k') | chromecast/shell/browser/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+#endif // defined(OS_ANDROID)
+
InitializeResourceBundle();
}
« no previous file with comments | « chromecast/shell/app/DEPS ('k') | chromecast/shell/browser/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698