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

Unified Diff: chromecast/crash/android/crash_handler.cc

Issue 1176003005: Chromecast: Android crash startup can't read path from /data/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: privileged flag --> process_type Created 5 years, 6 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/crash/android/crash_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/crash/android/crash_handler.cc
diff --git a/chromecast/crash/android/crash_handler.cc b/chromecast/crash/android/crash_handler.cc
index 8bd580b64d97ada1a74ff95a0bd6447da721fb67..4324b71d7c4fff92fd0d2d62b2f446a3a1305222 100644
--- a/chromecast/crash/android/crash_handler.cc
+++ b/chromecast/crash/android/crash_handler.cc
@@ -57,8 +57,8 @@ namespace chromecast {
void CrashHandler::Initialize(const std::string& process_type,
const base::FilePath& log_file_path) {
DCHECK(!g_crash_handler);
- g_crash_handler = new CrashHandler(log_file_path);
- g_crash_handler->Initialize(process_type);
+ g_crash_handler = new CrashHandler(process_type, log_file_path);
+ g_crash_handler->Initialize();
}
// static
@@ -73,9 +73,11 @@ bool CrashHandler::RegisterCastCrashJni(JNIEnv* env) {
return RegisterNativesImpl(env);
}
-CrashHandler::CrashHandler(const base::FilePath& log_file_path)
+CrashHandler::CrashHandler(const std::string& process_type,
+ const base::FilePath& log_file_path)
: log_file_path_(log_file_path),
- crash_reporter_client_(new CastCrashReporterClientAndroid) {
+ process_type_(process_type),
+ crash_reporter_client_(new CastCrashReporterClientAndroid(process_type)) {
if (!crash_reporter_client_->GetCrashDumpLocation(&crash_dump_path_)) {
LOG(ERROR) << "Could not get crash dump location";
}
@@ -87,8 +89,8 @@ CrashHandler::~CrashHandler() {
g_crash_handler = NULL;
}
-void CrashHandler::Initialize(const std::string& process_type) {
- if (process_type.empty()) {
+void CrashHandler::Initialize() {
+ if (process_type_.empty()) {
InitializeUploader();
// ExceptionHandlers are called on crash in reverse order of
@@ -100,13 +102,13 @@ void CrashHandler::Initialize(const std::string& process_type) {
crash_uploader_.reset(new google_breakpad::ExceptionHandler(
dummy, &HandleCrash, NULL, NULL, true, -1));
- breakpad::InitCrashReporter(process_type);
+ breakpad::InitCrashReporter(process_type_);
return;
}
- if (process_type != switches::kZygoteProcess) {
- breakpad::InitNonBrowserCrashReporterForAndroid(process_type);
+ if (process_type_ != switches::kZygoteProcess) {
+ breakpad::InitNonBrowserCrashReporterForAndroid(process_type_);
}
}
« no previous file with comments | « chromecast/crash/android/crash_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698