OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromecast/app/android/crash_handler.h" | 5 #include "chromecast/app/android/crash_handler.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/android/context_utils.h" | |
12 #include "base/android/jni_android.h" | 11 #include "base/android/jni_android.h" |
13 #include "base/android/jni_string.h" | 12 #include "base/android/jni_string.h" |
14 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
15 #include "base/logging.h" | 14 #include "base/logging.h" |
16 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
17 #include "breakpad/src/client/linux/handler/exception_handler.h" | 16 #include "breakpad/src/client/linux/handler/exception_handler.h" |
18 #include "breakpad/src/client/linux/handler/minidump_descriptor.h" | 17 #include "breakpad/src/client/linux/handler/minidump_descriptor.h" |
19 #include "chromecast/app/android/cast_crash_reporter_client_android.h" | 18 #include "chromecast/app/android/cast_crash_reporter_client_android.h" |
20 #include "chromecast/base/version.h" | 19 #include "chromecast/base/version.h" |
21 #include "components/crash/content/app/breakpad_linux.h" | 20 #include "components/crash/content/app/breakpad_linux.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 83 |
85 if (process_type_ != switches::kZygoteProcess) { | 84 if (process_type_ != switches::kZygoteProcess) { |
86 breakpad::InitNonBrowserCrashReporterForAndroid(process_type_); | 85 breakpad::InitNonBrowserCrashReporterForAndroid(process_type_); |
87 } | 86 } |
88 } | 87 } |
89 | 88 |
90 void CrashHandler::InitializeUploader() { | 89 void CrashHandler::InitializeUploader() { |
91 JNIEnv* env = base::android::AttachCurrentThread(); | 90 JNIEnv* env = base::android::AttachCurrentThread(); |
92 base::android::ScopedJavaLocalRef<jstring> crash_dump_path_java = | 91 base::android::ScopedJavaLocalRef<jstring> crash_dump_path_java = |
93 base::android::ConvertUTF8ToJavaString(env, crash_dump_path_.value()); | 92 base::android::ConvertUTF8ToJavaString(env, crash_dump_path_.value()); |
94 Java_CastCrashHandler_initializeUploader( | 93 Java_CastCrashHandler_initializeUploader(env, crash_dump_path_java, |
95 env, base::android::GetApplicationContext(), crash_dump_path_java, | 94 UploadCrashToStaging()); |
96 UploadCrashToStaging()); | |
97 } | 95 } |
98 | 96 |
99 } // namespace chromecast | 97 } // namespace chromecast |
OLD | NEW |