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

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

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « base/mac/bundle_locations.h ('k') | base/mac/mac_util.h » ('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 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
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
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_
OLDNEW
« no previous file with comments | « base/mac/bundle_locations.h ('k') | base/mac/mac_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698