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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « base/logging_unittest.cc ('k') | 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 7
8 #include <CoreFoundation/CoreFoundation.h> 8 #include <CoreFoundation/CoreFoundation.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 namespace base { 57 namespace base {
58 58
59 class FilePath; 59 class FilePath;
60 60
61 namespace mac { 61 namespace mac {
62 62
63 // Returns true if the application is running from a bundle 63 // Returns true if the application is running from a bundle
64 BASE_EXPORT bool AmIBundled(); 64 BASE_EXPORT bool AmIBundled();
65 BASE_EXPORT void SetOverrideAmIBundled(bool value); 65 BASE_EXPORT void SetOverrideAmIBundled(bool value);
66 66
67 #if defined(UNIT_TEST)
68 // This is required because instantiating some tests requires checking the
69 // directory structure, which sets the AmIBundled cache state. Individual tests
70 // may or may not be bundled, and this would trip them up if the cache weren't
71 // cleared. This should not be called from individual tests, just from test
72 // instantiation code that gets a path from PathService.
73 BASE_EXPORT void ClearAmIBundledCache();
74 #endif
75
67 // Returns true if this process is marked as a "Background only process". 76 // Returns true if this process is marked as a "Background only process".
68 BASE_EXPORT bool IsBackgroundOnlyProcess(); 77 BASE_EXPORT bool IsBackgroundOnlyProcess();
69 78
70 // Returns the path to a resource within the framework bundle. 79 // Returns the path to a resource within the framework bundle.
71 BASE_EXPORT FilePath PathForFrameworkBundleResource(CFStringRef resourceName); 80 BASE_EXPORT FilePath PathForFrameworkBundleResource(CFStringRef resourceName);
72 81
73 // Returns the creator code associated with the CFBundleRef at bundle. 82 // Returns the creator code associated with the CFBundleRef at bundle.
74 OSType CreatorCodeForCFBundleRef(CFBundleRef bundle); 83 OSType CreatorCodeForCFBundleRef(CFBundleRef bundle);
75 84
76 // Returns the creator code associated with this application, by calling 85 // Returns the creator code associated with this application, by calling
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 // by using the NSToCFCast methods above. 379 // by using the NSToCFCast methods above.
371 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo"); 380 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo");
372 // Operator << can not be overloaded for ObjectiveC types as the compiler 381 // Operator << can not be overloaded for ObjectiveC types as the compiler
373 // can not distinguish between overloads for id with overloads for void*. 382 // can not distinguish between overloads for id with overloads for void*.
374 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, 383 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o,
375 const CFErrorRef err); 384 const CFErrorRef err);
376 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, 385 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o,
377 const CFStringRef str); 386 const CFStringRef str);
378 387
379 #endif // BASE_MAC_FOUNDATION_UTIL_H_ 388 #endif // BASE_MAC_FOUNDATION_UTIL_H_
OLDNEW
« no previous file with comments | « base/logging_unittest.cc ('k') | base/mac/foundation_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698