| 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 | 7 |
| 8 #include <CoreFoundation/CoreFoundation.h> | 8 #include <CoreFoundation/CoreFoundation.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class NSBundle; | 21 class NSBundle; |
| 22 class NSString; | 22 class NSString; |
| 23 #endif // __OBJC__ | 23 #endif // __OBJC__ |
| 24 | 24 |
| 25 #if defined(OS_IOS) | 25 #if defined(OS_IOS) |
| 26 #include <CoreText/CoreText.h> | 26 #include <CoreText/CoreText.h> |
| 27 #else | 27 #else |
| 28 #include <ApplicationServices/ApplicationServices.h> | 28 #include <ApplicationServices/ApplicationServices.h> |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 class FilePath; | |
| 32 | |
| 33 // Adapted from NSPathUtilities.h and NSObjCRuntime.h. | 31 // Adapted from NSPathUtilities.h and NSObjCRuntime.h. |
| 34 #if __LP64__ || NS_BUILD_32_LIKE_64 | 32 #if __LP64__ || NS_BUILD_32_LIKE_64 |
| 35 typedef unsigned long NSSearchPathDirectory; | 33 typedef unsigned long NSSearchPathDirectory; |
| 36 typedef unsigned long NSSearchPathDomainMask; | 34 typedef unsigned long NSSearchPathDomainMask; |
| 37 #else | 35 #else |
| 38 typedef unsigned int NSSearchPathDirectory; | 36 typedef unsigned int NSSearchPathDirectory; |
| 39 typedef unsigned int NSSearchPathDomainMask; | 37 typedef unsigned int NSSearchPathDomainMask; |
| 40 #endif | 38 #endif |
| 41 | 39 |
| 42 typedef struct OpaqueSecTrustRef* SecACLRef; | 40 typedef struct OpaqueSecTrustRef* SecACLRef; |
| 43 typedef struct OpaqueSecTrustedApplicationRef* SecTrustedApplicationRef; | 41 typedef struct OpaqueSecTrustedApplicationRef* SecTrustedApplicationRef; |
| 44 | 42 |
| 45 namespace base { | 43 namespace base { |
| 44 |
| 45 class FilePath; |
| 46 |
| 46 namespace mac { | 47 namespace mac { |
| 47 | 48 |
| 48 // Returns true if the application is running from a bundle | 49 // Returns true if the application is running from a bundle |
| 49 BASE_EXPORT bool AmIBundled(); | 50 BASE_EXPORT bool AmIBundled(); |
| 50 BASE_EXPORT void SetOverrideAmIBundled(bool value); | 51 BASE_EXPORT void SetOverrideAmIBundled(bool value); |
| 51 | 52 |
| 52 // Returns true if this process is marked as a "Background only process". | 53 // Returns true if this process is marked as a "Background only process". |
| 53 BASE_EXPORT bool IsBackgroundOnlyProcess(); | 54 BASE_EXPORT bool IsBackgroundOnlyProcess(); |
| 54 | 55 |
| 55 // Returns the path to a resource within the framework bundle. | 56 // Returns the path to a resource within the framework bundle. |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 // by using the NSToCFCast methods above. | 350 // by using the NSToCFCast methods above. |
| 350 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo"); | 351 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo"); |
| 351 // Operator << can not be overloaded for ObjectiveC types as the compiler | 352 // Operator << can not be overloaded for ObjectiveC types as the compiler |
| 352 // can not distinguish between overloads for id with overloads for void*. | 353 // can not distinguish between overloads for id with overloads for void*. |
| 353 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, | 354 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, |
| 354 const CFErrorRef err); | 355 const CFErrorRef err); |
| 355 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, | 356 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, |
| 356 const CFStringRef str); | 357 const CFStringRef str); |
| 357 | 358 |
| 358 #endif // BASE_MAC_FOUNDATION_UTIL_H_ | 359 #endif // BASE_MAC_FOUNDATION_UTIL_H_ |
| OLD | NEW |