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

Side by Side Diff: components/breakpad/app/breakpad_linux.cc

Issue 113873006: [Android] Disable tombstones for renderer crashes on JB MR2+ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/android/java/src/org/chromium/base/BuildInfo.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // For linux_syscall_support.h. This makes it safe to call embedded system 5 // For linux_syscall_support.h. This makes it safe to call embedded system
6 // calls when in seccomp mode. 6 // calls when in seccomp mode.
7 7
8 #include "components/breakpad/app/breakpad_linux.h" 8 #include "components/breakpad/app/breakpad_linux.h"
9 9
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 info.fd = descriptor.fd(); 695 info.fd = descriptor.fd();
696 info.process_type = g_process_type; 696 info.process_type = g_process_type;
697 info.process_type_length = my_strlen(g_process_type); 697 info.process_type_length = my_strlen(g_process_type);
698 info.distro = distro; 698 info.distro = distro;
699 info.distro_length = distro_length; 699 info.distro_length = distro_length;
700 info.upload = false; 700 info.upload = false;
701 info.process_start_time = g_process_start_time; 701 info.process_start_time = g_process_start_time;
702 info.pid = g_pid; 702 info.pid = g_pid;
703 info.crash_keys = g_crash_keys; 703 info.crash_keys = g_crash_keys;
704 HandleCrashDump(info); 704 HandleCrashDump(info);
705 return FinalizeCrashDoneAndroid(); 705 bool finalize_result = FinalizeCrashDoneAndroid();
706 base::android::BuildInfo* android_build_info =
707 base::android::BuildInfo::GetInstance();
708 if (android_build_info->sdk_int() >= 18 &&
709 strcmp(android_build_info->build_type(), "eng") != 0 &&
710 strcmp(android_build_info->build_type(), "userdebug") != 0) {
711 // On JB MR2 and later, the system crash handler displays a dialog. For
712 // renderer crashes, this is a bad user experience and so this is disabled
713 // for user builds of Android.
714 // TODO(cjhopman): There should be some way to recover the crash stack from
715 // non-uploading user clients. See http://crbug.com/273706.
716 __android_log_write(ANDROID_LOG_WARN,
717 kGoogleBreakpad,
718 "Tombstones are disabled on JB MR2+ user builds.");
719 __android_log_write(ANDROID_LOG_WARN,
720 kGoogleBreakpad,
721 "### ### ### ### ### ### ### ### ### ### ### ### ###");
722 return true;
723 } else {
724 return finalize_result;
725 }
706 } 726 }
707 727
708 void EnableNonBrowserCrashDumping(const std::string& process_type, 728 void EnableNonBrowserCrashDumping(const std::string& process_type,
709 int minidump_fd) { 729 int minidump_fd) {
710 // This will guarantee that the BuildInfo has been initialized and subsequent 730 // This will guarantee that the BuildInfo has been initialized and subsequent
711 // calls will not require memory allocation. 731 // calls will not require memory allocation.
712 base::android::BuildInfo::GetInstance(); 732 base::android::BuildInfo::GetInstance();
713 SetClientIdFromCommandLine(*CommandLine::ForCurrentProcess()); 733 SetClientIdFromCommandLine(*CommandLine::ForCurrentProcess());
714 734
715 // On Android, the current sandboxing uses process isolation, in which the 735 // On Android, the current sandboxing uses process isolation, in which the
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 } 1535 }
1516 } 1536 }
1517 } 1537 }
1518 #endif // OS_ANDROID 1538 #endif // OS_ANDROID
1519 1539
1520 bool IsCrashReporterEnabled() { 1540 bool IsCrashReporterEnabled() {
1521 return g_is_crash_reporter_enabled; 1541 return g_is_crash_reporter_enabled;
1522 } 1542 }
1523 1543
1524 } // namespace breakpad 1544 } // namespace breakpad
OLDNEW
« no previous file with comments | « base/android/java/src/org/chromium/base/BuildInfo.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698