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

Side by Side Diff: base/logging.h

Issue 149765: Reverting 20497. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_LOGGING_H_ 5 #ifndef BASE_LOGGING_H_
6 #define BASE_LOGGING_H_ 6 #define BASE_LOGGING_H_
7 7
8 #include <string> 8 #include <string>
9 #include <cstring> 9 #include <cstring>
10 #include <sstream> 10 #include <sstream>
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 // Plus some debug-logging macros that get compiled to nothing for production 274 // Plus some debug-logging macros that get compiled to nothing for production
275 // 275 //
276 // DEBUG_MODE is for uses like 276 // DEBUG_MODE is for uses like
277 // if (DEBUG_MODE) foo.CheckThatFoo(); 277 // if (DEBUG_MODE) foo.CheckThatFoo();
278 // instead of 278 // instead of
279 // #ifndef NDEBUG 279 // #ifndef NDEBUG
280 // foo.CheckThatFoo(); 280 // foo.CheckThatFoo();
281 // #endif 281 // #endif
282 282
283 // http://crbug.com/16512 is open for a real fix for this. For now, Windows 283 #ifdef OFFICIAL_BUILD
284 // uses OFFICIAL_BUILD and !Windows uses the branding flag when NDEBUG is
285 // defined.
286 #if ( defined(OS_WIN) && defined(OFFICIAL_BUILD)) || \
287 (!defined(OS_WIN) && defined(NDEBUG) && defined(GOOGLE_CHROME_BUILD))
288 // We want to have optimized code for an official build so we remove DLOGS and 284 // We want to have optimized code for an official build so we remove DLOGS and
289 // DCHECK from the executable. 285 // DCHECK from the executable.
290 286
291 #define DLOG(severity) \ 287 #define DLOG(severity) \
292 true ? (void) 0 : logging::LogMessageVoidify() & LOG(severity) 288 true ? (void) 0 : logging::LogMessageVoidify() & LOG(severity)
293 289
294 #define DLOG_IF(severity, condition) \ 290 #define DLOG_IF(severity, condition) \
295 true ? (void) 0 : logging::LogMessageVoidify() & LOG(severity) 291 true ? (void) 0 : logging::LogMessageVoidify() & LOG(severity)
296 292
297 #define DLOG_ASSERT(condition) \ 293 #define DLOG_ASSERT(condition) \
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 #elif NOTIMPLEMENTED_POLICY == 4 642 #elif NOTIMPLEMENTED_POLICY == 4
647 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG 643 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG
648 #elif NOTIMPLEMENTED_POLICY == 5 644 #elif NOTIMPLEMENTED_POLICY == 5
649 #define NOTIMPLEMENTED() do {\ 645 #define NOTIMPLEMENTED() do {\
650 static int count = 0;\ 646 static int count = 0;\
651 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\ 647 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\
652 } while(0) 648 } while(0)
653 #endif 649 #endif
654 650
655 #endif // BASE_LOGGING_H_ 651 #endif // BASE_LOGGING_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698