Index: base/logging.h |
diff --git a/base/logging.h b/base/logging.h |
index 55c9ebfafbf3db7f44419145bcb486073fff6e88..045ecd432f25b0d84a255f376eb3ca318c150837 100644 |
--- a/base/logging.h |
+++ b/base/logging.h |
@@ -447,9 +447,17 @@ const LogSeverity LOG_0 = LOG_ERROR; |
#define PLOG_IF(severity, condition) \ |
LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity) && (condition)) |
-#if defined(OFFICIAL_BUILD) && defined(NDEBUG) |
+#if !defined(NDEBUG) |
+// Debug builds always include DCHECK and DLOG. |
+#undef LOGGING_IS_OFFICIAL_BUILD |
+#define LOGGING_IS_OFFICIAL_BUILD 0 |
+#elif defined(OFFICIAL_BUILD) |
+// Official release builds always disable and remove DCHECK and DLOG. |
+#undef LOGGING_IS_OFFICIAL_BUILD |
#define LOGGING_IS_OFFICIAL_BUILD 1 |
-#else |
+#elif !defined(LOGGING_IS_OFFICIAL_BUILD) |
+// Unless otherwise specified, unofficial release builds include |
+// DCHECK and DLOG. |
#define LOGGING_IS_OFFICIAL_BUILD 0 |
#endif |