OLD | NEW |
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_FOUNDATION_UTIL_H_ | 5 #ifndef BASE_MAC_FOUNDATION_UTIL_H_ |
6 #define BASE_MAC_FOUNDATION_UTIL_H_ | 6 #define BASE_MAC_FOUNDATION_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <CoreFoundation/CoreFoundation.h> | 9 #include <CoreFoundation/CoreFoundation.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/base_export.h" | 14 #include "base/base_export.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/mac/scoped_cftyperef.h" | 16 #include "base/mac/scoped_cftyperef.h" |
17 | 17 |
18 #if defined(__OBJC__) | 18 #if defined(__OBJC__) |
19 #import <Foundation/Foundation.h> | 19 #import <Foundation/Foundation.h> |
20 #else // __OBJC__ | 20 #else // __OBJC__ |
| 21 #include <CoreFoundation/CoreFoundation.h> |
21 class NSBundle; | 22 class NSBundle; |
22 class NSString; | 23 class NSString; |
23 #endif // __OBJC__ | 24 #endif // __OBJC__ |
24 | 25 |
25 class FilePath; | 26 class FilePath; |
26 | 27 |
27 // Adapted from NSPathUtilities.h and NSObjCRuntime.h. | 28 // Adapted from NSPathUtilities.h and NSObjCRuntime.h. |
28 #if __LP64__ || NS_BUILD_32_LIKE_64 | 29 #if __LP64__ || NS_BUILD_32_LIKE_64 |
29 typedef unsigned long NSSearchPathDirectory; | 30 typedef unsigned long NSSearchPathDirectory; |
30 typedef unsigned long NSSearchPathDomainMask; | 31 typedef unsigned long NSSearchPathDomainMask; |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 // by using the NSToCFCast methods above. | 330 // by using the NSToCFCast methods above. |
330 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo"); | 331 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo"); |
331 // Operator << can not be overloaded for ObjectiveC types as the compiler | 332 // Operator << can not be overloaded for ObjectiveC types as the compiler |
332 // can not distinguish between overloads for id with overloads for void*. | 333 // can not distinguish between overloads for id with overloads for void*. |
333 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, | 334 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, |
334 const CFErrorRef err); | 335 const CFErrorRef err); |
335 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, | 336 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, |
336 const CFStringRef str); | 337 const CFStringRef str); |
337 | 338 |
338 #endif // BASE_MAC_FOUNDATION_UTIL_H_ | 339 #endif // BASE_MAC_FOUNDATION_UTIL_H_ |
OLD | NEW |