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

Unified Diff: chrome/app/mash/mash_crash_keys.h

Issue 2718123003: mash: Store chrome --mash crash key metadata in shared memory
Patch Set: rebase Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/app/mash/mash_crash_keys.h
diff --git a/chrome/app/mash/mash_crash_keys.h b/chrome/app/mash/mash_crash_keys.h
new file mode 100644
index 0000000000000000000000000000000000000000..44e635b2e34cec6528eff24e1416d646e0dd0fcd
--- /dev/null
+++ b/chrome/app/mash/mash_crash_keys.h
@@ -0,0 +1,32 @@
+// Copyright 2017 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_MASH_MASH_CRASH_KEYS_H_
+#define CHROME_APP_MASH_MASH_CRASH_KEYS_H_
+
+#include <stddef.h>
+
+#if !defined(OS_CHROMEOS)
+#error Unsupported platform
hashimoto 2017/03/02 07:42:23 Why do we need this when mash_crash_keys.cc is alr
+#endif
+
+namespace mash_crash_keys {
+
+// Initializes mash support for crash keys (see base::debug::crash_logging.h).
hashimoto 2017/03/02 07:42:22 nit: "base::debug::crash_logging.h" -> "base/debug
+// Uses shared memory to provide crash metadata to the OS-level crash_reporter
+// process.
+void Initialize();
+
+// Cleans up the shared memory used for crash keys.
+void Shutdown();
+
+// Returns the number of crash keys that have been set.
+size_t GetCrashKeyCountForTesting();
+
+// Returns the shared memory file descriptor.
+int GetSharedMemoryFdForTesting();
+
+} // namespace mash_crash_keys
+
+#endif // CHROME_APP_MASH_MASH_CRASH_KEYS_H_

Powered by Google App Engine
This is Rietveld 408576698