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

Side by Side Diff: base/mac/mac_logging.h

Issue 10698149: Add minimal support for process_utils on iOS (Closed) Base URL: http://git.chromium.org/chromium/src.git@all-ios-tweak
Patch Set: Address review comments Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MAC_MAC_LOGGING_H_ 5 #ifndef BASE_MAC_MAC_LOGGING_H_
6 #define BASE_MAC_MAC_LOGGING_H_ 6 #define BASE_MAC_MAC_LOGGING_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h"
10 #include "base/logging.h"
11
12 #if defined(OS_IOS)
13 #include "MacTypes.h"
14 #else
9 #include <libkern/OSTypes.h> 15 #include <libkern/OSTypes.h>
10 16 #endif
11 #include "base/logging.h"
12 17
13 // Use the OSSTATUS_LOG family to log messages related to errors in Mac OS X 18 // Use the OSSTATUS_LOG family to log messages related to errors in Mac OS X
14 // system routines that report status via an OSStatus or OSErr value. It is 19 // system routines that report status via an OSStatus or OSErr value. It is
15 // similar to the PLOG family which operates on errno, but because there is no 20 // similar to the PLOG family which operates on errno, but because there is no
16 // global (or thread-local) OSStatus or OSErr value, the specific error must 21 // global (or thread-local) OSStatus or OSErr value, the specific error must
17 // be supplied as an argument to the OSSTATUS_LOG macro. The message logged 22 // be supplied as an argument to the OSSTATUS_LOG macro. The message logged
18 // will contain the symbolic constant name corresponding to the status value, 23 // will contain the symbolic constant name corresponding to the status value,
19 // along with the value itself. 24 // along with the value itself.
20 // 25 //
21 // OSErr is just an older 16-bit form of the newer 32-bit OSStatus. Despite 26 // OSErr is just an older 16-bit form of the newer 32-bit OSStatus. Despite
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #define OSSTATUS_DVLOG_IF(verbose_level, condition, status) \ 79 #define OSSTATUS_DVLOG_IF(verbose_level, condition, status) \
75 LAZY_STREAM(OSSTATUS_VPLOG_STREAM(verbose_level, status) \ 80 LAZY_STREAM(OSSTATUS_VPLOG_STREAM(verbose_level, status) \
76 DVLOG_IS_ON(verbose_level) && (condition)) 81 DVLOG_IS_ON(verbose_level) && (condition))
77 82
78 #define OSSTATUS_DCHECK(condition, status) \ 83 #define OSSTATUS_DCHECK(condition, status) \
79 LAZY_STREAM(OSSTATUS_LOG_STREAM(FATAL, status), \ 84 LAZY_STREAM(OSSTATUS_LOG_STREAM(FATAL, status), \
80 DCHECK_IS_ON() && !(condition)) \ 85 DCHECK_IS_ON() && !(condition)) \
81 << "Check failed: " # condition << ". " 86 << "Check failed: " # condition << ". "
82 87
83 #endif // BASE_MAC_MAC_LOGGING_H_ 88 #endif // BASE_MAC_MAC_LOGGING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698