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

Unified Diff: chrome/browser/chrome_browser_main_android.cc

Issue 889083002: Initialize Android CrashDumpManager earlier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/CHECK/DCHECK Created 5 years, 11 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
Index: chrome/browser/chrome_browser_main_android.cc
diff --git a/chrome/browser/chrome_browser_main_android.cc b/chrome/browser/chrome_browser_main_android.cc
index 979b296e14c18e683c61d37ee8e0fc81f731840f..f79ab49e703fd90b25f84e95ff35858b498ef7b3 100644
--- a/chrome/browser/chrome_browser_main_android.cc
+++ b/chrome/browser/chrome_browser_main_android.cc
@@ -29,8 +29,13 @@ ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid(
ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() {
}
-void ChromeBrowserMainPartsAndroid::PreProfileInit() {
- TRACE_EVENT0("startup", "ChromeBrowserMainPartsAndroid::PreProfileInit")
+int ChromeBrowserMainPartsAndroid::PreCreateThreads() {
+ TRACE_EVENT0("startup", "ChromeBrowserMainPartsAndroid::PreCreateThreads")
+
+ // The CrashDumpManager must be initialized before any child process is
+ // created (as they need to access it during creation). Such processes
+ // are created on the PROCESS_LAUNCHER thread, and so the manager is
+ // initialized before that thread is created.
#if defined(GOOGLE_CHROME_BUILD)
// TODO(jcivelli): we should not initialize the crash-reporter when it was not
// enabled. Right now if it is disabled we still generate the minidumps but we
@@ -51,7 +56,7 @@ void ChromeBrowserMainPartsAndroid::PreProfileInit() {
crash_dump_manager_.reset(new breakpad::CrashDumpManager(crash_dump_dir));
}
- ChromeBrowserMainParts::PreProfileInit();
+ return ChromeBrowserMainParts::PreCreateThreads();
}
void ChromeBrowserMainPartsAndroid::PostProfileInit() {
« no previous file with comments | « chrome/browser/chrome_browser_main_android.h ('k') | components/crash/browser/crash_dump_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698