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

Unified Diff: src/client/linux/log/log.h

Issue 1286063003: [microdump] Move microdump writes to the crash ring-buffer log (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk
Patch Set: Nits Created 5 years, 4 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 | « src/client/linux/handler/exception_handler.cc ('k') | src/client/linux/log/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/client/linux/log/log.h
diff --git a/src/client/linux/log/log.h b/src/client/linux/log/log.h
index a50e30dcd4f53409dcd4c86059b1c86a1be5028a..f94bbd5fb7b3de14b2ed6cd2067af449cef237bc 100644
--- a/src/client/linux/log/log.h
+++ b/src/client/linux/log/log.h
@@ -36,6 +36,20 @@ namespace logger {
int write(const char* buf, size_t nbytes);
+// In the case of Android the log can be written to the default system log
+// (default behavior of write() above, or to the crash log (see
+// writeToCrashLog() below).
+#if defined(__ANDROID__)
+
+// The logger must be initialized in a non-compromised context.
+void initializeCrashLogWriter();
+
+// Once initialized, writeToCrashLog is safe to use in a compromised context,
+// even if the initialization failed, in which case this will silently fall
+// back on write().
+int writeToCrashLog(const char* buf);
+#endif
+
} // namespace logger
#endif // CLIENT_LINUX_LOG_LOG_H_
« no previous file with comments | « src/client/linux/handler/exception_handler.cc ('k') | src/client/linux/log/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698