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

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

Issue 10407003: Fix Mac shared component build following r137235 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | base/mac/foundation_util.mm » ('j') | 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) 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
(...skipping 15 matching lines...) Expand all
26 26
27 // Adapted from NSPathUtilities.h and NSObjCRuntime.h. 27 // Adapted from NSPathUtilities.h and NSObjCRuntime.h.
28 #if __LP64__ || NS_BUILD_32_LIKE_64 28 #if __LP64__ || NS_BUILD_32_LIKE_64
29 typedef unsigned long NSSearchPathDirectory; 29 typedef unsigned long NSSearchPathDirectory;
30 typedef unsigned long NSSearchPathDomainMask; 30 typedef unsigned long NSSearchPathDomainMask;
31 #else 31 #else
32 typedef unsigned int NSSearchPathDirectory; 32 typedef unsigned int NSSearchPathDirectory;
33 typedef unsigned int NSSearchPathDomainMask; 33 typedef unsigned int NSSearchPathDomainMask;
34 #endif 34 #endif
35 35
36 typedef struct OpaqueSecTrustRef* SecACLRef;
37 typedef struct OpaqueSecTrustedApplicationRef* SecTrustedApplicationRef;
Nico 2012/05/16 16:55:11 I think it's strange that something in base/mac co
38
36 namespace base { 39 namespace base {
37 namespace mac { 40 namespace mac {
38 41
39 // Returns true if the application is running from a bundle 42 // Returns true if the application is running from a bundle
40 BASE_EXPORT bool AmIBundled(); 43 BASE_EXPORT bool AmIBundled();
41 BASE_EXPORT void SetOverrideAmIBundled(bool value); 44 BASE_EXPORT void SetOverrideAmIBundled(bool value);
42 45
43 // Returns true if this process is marked as a "Background only process". 46 // Returns true if this process is marked as a "Background only process".
44 BASE_EXPORT bool IsBackgroundOnlyProcess(); 47 BASE_EXPORT bool IsBackgroundOnlyProcess();
45 48
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 CF_CAST_DECL(CFBag); 241 CF_CAST_DECL(CFBag);
239 CF_CAST_DECL(CFBoolean); 242 CF_CAST_DECL(CFBoolean);
240 CF_CAST_DECL(CFData); 243 CF_CAST_DECL(CFData);
241 CF_CAST_DECL(CFDate); 244 CF_CAST_DECL(CFDate);
242 CF_CAST_DECL(CFDictionary); 245 CF_CAST_DECL(CFDictionary);
243 CF_CAST_DECL(CFNull); 246 CF_CAST_DECL(CFNull);
244 CF_CAST_DECL(CFNumber); 247 CF_CAST_DECL(CFNumber);
245 CF_CAST_DECL(CFSet); 248 CF_CAST_DECL(CFSet);
246 CF_CAST_DECL(CFString); 249 CF_CAST_DECL(CFString);
247 250
248 #undef CF_CAST_DEFN 251 CF_CAST_DECL(SecACL);
252 CF_CAST_DECL(SecTrustedApplication);
253
254 #undef CF_CAST_DECL
249 255
250 #if defined(__OBJC__) 256 #if defined(__OBJC__)
251 257
252 // ObjCCast<>() and ObjCCastStrict<>() cast a basic id to a more 258 // ObjCCast<>() and ObjCCastStrict<>() cast a basic id to a more
253 // specific (NSObject-derived) type. The compatibility of the passed 259 // specific (NSObject-derived) type. The compatibility of the passed
254 // object is found by checking if it's a kind of the requested type 260 // object is found by checking if it's a kind of the requested type
255 // identifier. If the supplied object is not compatible with the 261 // identifier. If the supplied object is not compatible with the
256 // requested return type, ObjCCast<>() returns nil and 262 // requested return type, ObjCCast<>() returns nil and
257 // ObjCCastStrict<>() will DCHECK. Providing a nil pointer to either 263 // ObjCCastStrict<>() will DCHECK. Providing a nil pointer to either
258 // variant results in nil being returned without triggering any DCHECK. 264 // variant results in nil being returned without triggering any DCHECK.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // by using the NSToCFCast methods above. 329 // by using the NSToCFCast methods above.
324 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo"); 330 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo");
325 // Operator << can not be overloaded for ObjectiveC types as the compiler 331 // Operator << can not be overloaded for ObjectiveC types as the compiler
326 // can not distinguish between overloads for id with overloads for void*. 332 // can not distinguish between overloads for id with overloads for void*.
327 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, 333 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o,
328 const CFErrorRef err); 334 const CFErrorRef err);
329 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, 335 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o,
330 const CFStringRef str); 336 const CFStringRef str);
331 337
332 #endif // BASE_MAC_FOUNDATION_UTIL_H_ 338 #endif // BASE_MAC_FOUNDATION_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/mac/foundation_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698