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

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: Created 7 years 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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 info.fd = descriptor.fd(); 694 info.fd = descriptor.fd();
695 info.process_type = g_process_type; 695 info.process_type = g_process_type;
696 info.process_type_length = my_strlen(g_process_type); 696 info.process_type_length = my_strlen(g_process_type);
697 info.distro = distro; 697 info.distro = distro;
698 info.distro_length = distro_length; 698 info.distro_length = distro_length;
699 info.upload = false; 699 info.upload = false;
700 info.process_start_time = g_process_start_time; 700 info.process_start_time = g_process_start_time;
701 info.pid = g_pid; 701 info.pid = g_pid;
702 info.crash_keys = g_crash_keys; 702 info.crash_keys = g_crash_keys;
703 HandleCrashDump(info); 703 HandleCrashDump(info);
704 return FinalizeCrashDoneAndroid(); 704 bool finalize_result = FinalizeCrashDoneAndroid();
705 base::android::BuildInfo* android_build_info =
706 base::android::BuildInfo::GetInstance();
707 if (android_build_info->sdk_int() >= 18 &&
708 strcmp(android_build_info->build_type(), "eng") != 0 &&
Yaron 2013/12/17 01:22:52 Why not explicitly check for user builds? Are you
709 strcmp(android_build_info->build_type(), "userdebug") != 0) {
710 // On JB MR2 and later, the system crash handler displays a dialog. For
711 // renderer crashes, this is a bad user experience and so this is disabled
712 // for user builds of Android.
713 // TODO(cjhopman): There should be some way to recover the crash stack from
714 // non-uploading user clients. See http://crbug.com/273706.
715 __android_log_write(ANDROID_LOG_WARN,
716 kGoogleBreakpad,
717 "Tombstones are disabled on JB MR2+ user builds.");
718 __android_log_write(ANDROID_LOG_WARN,
719 kGoogleBreakpad,
720 "### ### ### ### ### ### ### ### ### ### ### ### ###");
721 return true;
722 } else {
723 return finalize_result;
724 }
705 } 725 }
706 726
707 void EnableNonBrowserCrashDumping(const std::string& process_type, 727 void EnableNonBrowserCrashDumping(const std::string& process_type,
708 int minidump_fd) { 728 int minidump_fd) {
709 // This will guarantee that the BuildInfo has been initialized and subsequent 729 // This will guarantee that the BuildInfo has been initialized and subsequent
710 // calls will not require memory allocation. 730 // calls will not require memory allocation.
711 base::android::BuildInfo::GetInstance(); 731 base::android::BuildInfo::GetInstance();
712 SetClientIdFromCommandLine(*CommandLine::ForCurrentProcess()); 732 SetClientIdFromCommandLine(*CommandLine::ForCurrentProcess());
713 733
714 // On Android, the current sandboxing uses process isolation, in which the 734 // On Android, the current sandboxing uses process isolation, in which the
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 } 1534 }
1515 } 1535 }
1516 } 1536 }
1517 #endif // OS_ANDROID 1537 #endif // OS_ANDROID
1518 1538
1519 bool IsCrashReporterEnabled() { 1539 bool IsCrashReporterEnabled() {
1520 return g_is_crash_reporter_enabled; 1540 return g_is_crash_reporter_enabled;
1521 } 1541 }
1522 1542
1523 } // namespace breakpad 1543 } // 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