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

Unified Diff: base/mac/mac_logging.h

Issue 278923002: Use the new ScopedMachVM class and the MACH_LOG family of logging macros (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « no previous file | base/mac/mach_logging.h » ('j') | base/memory/discardable_memory_mac.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/mac_logging.h
diff --git a/base/mac/mac_logging.h b/base/mac/mac_logging.h
index 02f205d853cb32110009368eae190f88c12579d9..b18c214816279e3da38e68465ca8e59f3e53e554 100644
--- a/base/mac/mac_logging.h
+++ b/base/mac/mac_logging.h
@@ -43,6 +43,12 @@ class BASE_EXPORT OSStatusLogMessage : public logging::LogMessage {
} // namespace logging
+#if defined(NDEBUG)
+#define MAC_DVLOG_IS_ON(verbose_level) 0
+#else
+#define MAC_DVLOG_IS_ON(verbose_level) VLOG_IS_ON(verbose_level)
+#endif
+
#define OSSTATUS_LOG_STREAM(severity, status) \
COMPACT_GOOGLE_LOG_EX_ ## severity(OSStatusLogMessage, status).stream()
#define OSSTATUS_VLOG_STREAM(verbose_level, status) \
@@ -74,10 +80,10 @@ class BASE_EXPORT OSStatusLogMessage : public logging::LogMessage {
#define OSSTATUS_DVLOG(verbose_level, status) \
LAZY_STREAM(OSSTATUS_VLOG_STREAM(verbose_level, status), \
- DVLOG_IS_ON(verbose_level))
+ MAC_DVLOG_IS_ON(verbose_level))
#define OSSTATUS_DVLOG_IF(verbose_level, condition, status) \
- LAZY_STREAM(OSSTATUS_VLOG_STREAM(verbose_level, status) \
- DVLOG_IS_ON(verbose_level) && (condition))
+ LAZY_STREAM(OSSTATUS_VLOG_STREAM(verbose_level, status), \
+ MAC_DVLOG_IS_ON(verbose_level) && (condition))
#define OSSTATUS_DCHECK(condition, status) \
LAZY_STREAM(OSSTATUS_LOG_STREAM(FATAL, status), \
« no previous file with comments | « no previous file | base/mac/mach_logging.h » ('j') | base/memory/discardable_memory_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698