Don't preload rarely seen large images
[chromium-blink-merge.git] / third_party / cld / base / log_severity.h
blobecb01d9f9e41e1b33084b7b9d88b3c218bba0b3b
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef BASE_LOG_SEVERITY_H_
6 #define BASE_LOG_SEVERITY_H_
8 #include "base/port.h"
9 #include "base/commandlineflags.h"
11 // Variables of type LogSeverity are widely taken to lie in the range
12 // [0, NUM_SEVERITIES-1]. Be careful to preserve this assumption if
13 // you ever need to change their values or add a new severity.
14 typedef int LogSeverity;
16 const int INFO = 0, WARNING = 1, ERROR = 2, FATAL = 3, NUM_SEVERITIES = 4;
18 // DFATAL is FATAL in debug mode, ERROR in normal mode
19 #ifdef NDEBUG
20 #define DFATAL_LEVEL ERROR
21 #else
22 #define DFATAL_LEVEL FATAL
23 #endif
25 extern const char* const LogSeverityNames[NUM_SEVERITIES];
27 // Some flags needed for VLOG and RAW_VLOG
28 DECLARE_int32(v);
29 DECLARE_bool(silent_init);
31 // NDEBUG usage helpers related to (RAW_)DCHECK:
33 // DEBUG_MODE is for small !NDEBUG uses like
34 // if (DEBUG_MODE) foo.CheckThatFoo();
35 // instead of substantially more verbose
36 // #ifndef NDEBUG
37 // foo.CheckThatFoo();
38 // #endif
40 #ifdef NDEBUG
41 enum { DEBUG_MODE = 0 };
42 #else
43 enum { DEBUG_MODE = 1 };
44 #endif
46 #endif // BASE_LOG_SEVERITY_H_