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

Unified Diff: chrome/app/breakpad_linux_impl.h

Issue 16019015: [Linux] Implement the crash key logging mechanism. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 7 years, 7 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 | « chrome/app/breakpad_linux.cc ('k') | chrome/browser/crash_handler_host_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/breakpad_linux_impl.h
diff --git a/chrome/app/breakpad_linux.h b/chrome/app/breakpad_linux_impl.h
similarity index 69%
copy from chrome/app/breakpad_linux.h
copy to chrome/app/breakpad_linux_impl.h
index 8f469261c45947d7e6d85487ecaf18a44b9c3d9c..30125300336824b0cb137c295effcb109f8ce977 100644
--- a/chrome/app/breakpad_linux.h
+++ b/chrome/app/breakpad_linux_impl.h
@@ -1,19 +1,21 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_APP_BREAKPAD_LINUX_H_
-#define CHROME_APP_BREAKPAD_LINUX_H_
+// Internal header file for the Linux breakpad implementation. This file is
+// shared between crash_handler_host_linux.cc and breakpad_linux.cc. It should
+// only be used in files compiled with linux_breakpad=1.
+
+#ifndef CHROME_APP_BREAKPAD_LINUX_IMPL_H_
+#define CHROME_APP_BREAKPAD_LINUX_IMPL_H_
#include <sys/types.h>
#include "base/basictypes.h"
+#include "breakpad/src/common/simple_string_dictionary.h"
+#include "chrome/app/breakpad_linux.h"
-extern void InitCrashReporter();
-#if defined(OS_ANDROID)
-extern void InitNonBrowserCrashReporterForAndroid();
-#endif
-bool IsCrashReporterEnabled();
+typedef google_breakpad::NonAllocatingMap<256, 256, 64> CrashKeyStorage;
static const size_t kMaxActiveURLSize = 1024;
static const size_t kGuidSize = 32; // 128 bits = 32 chars in hex.
@@ -26,6 +28,15 @@ static const size_t kMaxAsanReportSize = 1 << 16;
// no limit.
static const off_t kMaxMinidumpFileSize = 1258291;
+// The size of the iovec used to transfer crash data from a child back to the
+// browser.
+#if !defined(ADDRESS_SANITIZER)
+const size_t kCrashIovSize = 9;
+#else
+// Additional field to pass the AddressSanitizer log to the crash handler.
+const size_t kCrashIovSize = 10;
+#endif
+
// BreakpadInfo describes a crash report.
// The minidump information can either be contained in a file descriptor (fd) or
// in a file (whose path is in filename).
@@ -49,8 +60,9 @@ struct BreakpadInfo {
uint64_t process_start_time; // Uptime of the crashing process.
size_t oom_size; // Amount of memory requested if OOM.
uint64_t pid; // PID where applicable.
+ CrashKeyStorage* crash_keys;
};
extern void HandleCrashDump(const BreakpadInfo& info);
-#endif // CHROME_APP_BREAKPAD_LINUX_H_
+#endif // CHROME_APP_BREAKPAD_LINUX_IMPL_H_
« no previous file with comments | « chrome/app/breakpad_linux.cc ('k') | chrome/browser/crash_handler_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698