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

Unified Diff: chromecast/shell/browser/cast_browser_main_parts.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/browser/DEPS ('k') | chromecast/shell/browser/cast_browser_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/shell/browser/cast_browser_main_parts.cc
diff --git a/chromecast/shell/browser/cast_browser_main_parts.cc b/chromecast/shell/browser/cast_browser_main_parts.cc
index 19b8b562f56e84979bdfc648a00adcf99cb031cc..ec3e2e9b973d658c23d5c1b68ac4088c79a6347c 100644
--- a/chromecast/shell/browser/cast_browser_main_parts.cc
+++ b/chromecast/shell/browser/cast_browser_main_parts.cc
@@ -23,6 +23,8 @@
#include "media/base/media_switches.h"
#if defined(OS_ANDROID)
+#include "chromecast/crash/android/crash_handler.h"
+#include "components/crash/browser/crash_dump_manager_android.h"
#include "net/android/network_change_notifier_factory_android.h"
#endif // defined(OS_ANDROID)
@@ -109,6 +111,16 @@ void CastBrowserMainParts::PreMainMessageLoopRun() {
content::BrowserThread::GetBlockingPool(),
ChromecastConfig::GetInstance()->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(
+ new breakpad::CrashDumpManager(crash_dumps_dir));
+#endif
+
cast_browser_process_->SetRemoteDebuggingServer(new RemoteDebuggingServer());
InitializeWebUI();
« no previous file with comments | « chromecast/shell/browser/DEPS ('k') | chromecast/shell/browser/cast_browser_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698