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

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

Issue 692093005: Crash component: adds API for clients to handle the crash minidump. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: context warning doc Created 6 years, 1 month 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
« no previous file with comments | « no previous file | components/crash/app/crash_reporter_client.h » ('j') | 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/crash/app/breakpad_linux.h" 8 #include "components/crash/app/breakpad_linux.h"
9 9
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 #endif 1184 #endif
1185 1185
1186 void HandleCrashDump(const BreakpadInfo& info) { 1186 void HandleCrashDump(const BreakpadInfo& info) {
1187 int dumpfd; 1187 int dumpfd;
1188 bool keep_fd = false; 1188 bool keep_fd = false;
1189 size_t dump_size; 1189 size_t dump_size;
1190 uint8_t* dump_data; 1190 uint8_t* dump_data;
1191 google_breakpad::PageAllocator allocator; 1191 google_breakpad::PageAllocator allocator;
1192 const char* exe_buf = NULL; 1192 const char* exe_buf = NULL;
1193 1193
1194 if (GetCrashReporterClient()->HandleCrashDump(info.filename)) {
1195 return;
1196 }
1197
1194 #if defined(OS_CHROMEOS) 1198 #if defined(OS_CHROMEOS)
1195 // Grab the crashing process' name now, when it should still be available. 1199 // Grab the crashing process' name now, when it should still be available.
1196 // If we try to do this later in our grandchild the crashing process has 1200 // If we try to do this later in our grandchild the crashing process has
1197 // already terminated. 1201 // already terminated.
1198 exe_buf = GetCrashingProcessName(info, &allocator); 1202 exe_buf = GetCrashingProcessName(info, &allocator);
1199 #endif 1203 #endif
1200 1204
1201 if (info.fd != -1) { 1205 if (info.fd != -1) {
1202 // Dump is provided with an open FD. 1206 // Dump is provided with an open FD.
1203 keep_fd = true; 1207 keep_fd = true;
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 } 1643 }
1640 } 1644 }
1641 } 1645 }
1642 #endif // OS_ANDROID 1646 #endif // OS_ANDROID
1643 1647
1644 bool IsCrashReporterEnabled() { 1648 bool IsCrashReporterEnabled() {
1645 return g_is_crash_reporter_enabled; 1649 return g_is_crash_reporter_enabled;
1646 } 1650 }
1647 1651
1648 } // namespace breakpad 1652 } // namespace breakpad
OLDNEW
« no previous file with comments | « no previous file | components/crash/app/crash_reporter_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698