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

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: Rebase onto r269793 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 | « base/base.gypi ('k') | base/mac/mach_logging.h » ('j') | no next file with comments »
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..1081490ec4a657e40b03668f7fe3ed3a74bc1762 100644
--- a/base/mac/mac_logging.h
+++ b/base/mac/mac_logging.h
@@ -5,6 +5,8 @@
#ifndef BASE_MAC_MAC_LOGGING_H_
#define BASE_MAC_MAC_LOGGING_H_
+#include "base/base_export.h"
+#include "base/basictypes.h"
#include "base/logging.h"
#include "build/build_config.h"
@@ -43,6 +45,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 +82,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 | « base/base.gypi ('k') | base/mac/mach_logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698